30 Mar

Optical Character Recognition (OCR) in Javascript in your browser

OCR in browser

Like everything else becoming available in the browser, now there’s OCR for Javascript. The demo which you can try our here captures documents from the user’s webcam, then applies image processing to convert the image to machine readable black and white bitmap and then uses the Javascript implementation of Orcad (an GNU licensed open source OCR program), called Orcad.js to convert the processed image into text.

Even though I called it implementation before, Orcad.js was created using Emscripten, a trans-compiler which turns C or C++ code into web browser compatible Javascript (not the most accurate description of the process but that’s the general idea). Looks like an awesome tool, which I hope to have the time to play with some day. You can check it out here.

If you missed the link, demo here. Read/download Orcad.js here. The image processing is applied using glfx.js which used WebGL to accelerate image processing on the client.

There’s also a video demonstration:

24 Mar

Unix-like Tail function in Windows without installing new software

Apache-Error-Log-Contents

Windows Powershell has a powerful command that lets you view the last lines of a text file or even monitor it for new lines, similar to tail -f command in Linux. Here’s some examples:

 

The following will view the last 10 lines of Apache’s log file:

PS c:\apache\logs> gc access.log -last 10

The following will view the whole apache log file and when done, will continue waiting for new entries:

PS c:\apache\logs> gc access.log -wait

Of course the previous example is not very useful if your log file is already large, so you can combine the two commands and skip to the last lines like this:

PS c:\apache\logs> gc access.log -wait -last 10

Until I discovered the above command I used Tail Win32 to monitor log files, so this makes life easier.

21 Oct

x86 Emulator in your Browser

Javascript x86 Emulator

Javascript x86 Emulator

For me, this one-man project is like magic. A fully-blown x86 emulator which runs a real-world BIOS (SeaBIOS). This means it can run regular x86 16bit OS’s as long as the browser allows it enough resources. It goes a long way to show what’s possible in the browser these days (well to be honest, this could have been done 3-4 years ago if Javascript was taken as seriously as it is today). It obviously runs slower than native performance but it is quite usable, especially with command line interface. There is no real practical use at the moment but maybe with further development something similar can be used to emulate x86 on ARM based devices in the future.

Take a look for yourself at http://copy.sh/v24/. There’s 4 OS images you can load directly from the page, including FreeBSD, Linux, FreeDOS and KolibriOS which is GUI based. You can also load your own ISO images to boot in the emulator. KolibriOS works fine so does FreeDOS, which even has some playable DOS games like Tetris and Snake which brought back memories of my MS-DOS days.

For experimental purposes only I also downloaded a Windows 3.1 ISO CD image off piratebay and tried to run it but it didn’t really work (I think the problem was with the image not being properly bootable rather than the emulator – after all Windows prior XP was first booting MS-DOS and then running Windows). I also attempted to load TinyCore Linux but I didn’t get far with that one either. TinyCore’s ISO is just under 15MB with GUI included. It took around 10 minutes to boot on an i7 laptop but never made it into the GUI.

Anyway if you don’t have the time to fiddle around you can view the following 5 min video I made running the emulator in Chrome:

03 Oct

Cyprus Broadband and Mobile Marketshare (Q2 2013)

broadband

broadband
According to statistics released by the Cyprus Office of Electronic Communications & Postal Regulation (OCECPR) the broadband market share for the 2nd Quarter of 2013 are as follows:

Broadband Marketshare Cyprus 2013 (2nd Quarter)

Cablenet seems to be the winner of that period with a 2.7% increase while Cyta continues to be the loser with a 2.9% decrease. During this period the broadband penetration in Cyprus was 69% (down from 71%, same period last year). This is the first time it decreased since broadband connectivity was first introduced to Cyprus. This can be accounted to the economic situation (a lot of businesses closed down, taking their connectivity with them) and the fact that a lot of people use mobile connectivity for their basic internet fix.

On the mobile battlefield, the percentages are as follows:
Cyprus Mobile Marketshare 2013 (2nd Quarter)

02 Oct

Google Web Designer – my take

Google Web Designer

Google Web Designer

Yesterday Google released a new design tool going by the name ‘Google Web Designer’. I installed it and played around a bit. It seems like they got carried away with the title cause it certainly isn’t a web design tool in the sense of Dreamweaver, its more of an animated banner creation tool. Its output is an ‘HTML5′ document (sorry for the cliche) and uses both Canvas 2D and 3D elements to create banners in a user interface that reminds me of Adobe’s Flash (still have nightmares of that) and Adobe’s new animation tool Edge Animate. If you ignore this app’s bad title, its a pretty decent tool for making banners for AdSense or other purposes. The code produced by the tool is not the leanest but works on modern browsers, and even on mobile. To see the extend of how much overhead is included check out this gist on github; the author created a new document, drew a rectangle with a sold color and saved and that was the result. This means that if you are making a very simple banner, the CSS and Javascript overhead can be substantial (consider that each banner on a page will be running on its own IFrame); on the bright site it can do things without coding that you’d normally need flash for without losing mobile compatibility. Moreover it allows you to create responsive ads; a feature that Google’s own AdSense product now supports (after many years of publisher requests).

Even if it’s destined for ads, it doesn’t mean you can’t use it to put together a single page website, but lets hope that Google Web Designer won’t be the beginning of another ‘Flash’-like era where Canvas is used instead of the Flash container plugin leading to bloated, hard to maintain, and non-indexable websites all over again.

You can have a look of how it works here:

and download it for free here:

30 Sep

High quality photography from simple cheap lenses using post-processing (Video)

Sample Results
Sample Results

Sample Results

There is a good reason why DSLR camera lenses are so expensive; in order to perfectly focus an image many lens elements are required making the whole system expensive to both to design and manufacture. But with the following research it seems like there is a high quality future for cheap lenses too. The research paper describes a way to post-process images, shot through a cheap single element lens and bring out the lost sharpness of the original image. The process works by calculating the way the image is distorted when passed through the lens and then reversing its effects. To do this they first shoot calibration targets and mathematically extract the distortion pattern for the particular lens. You can view the video below for more details:

I can see this having a good practical application in mobile phone imaging where due to the size of the optics its nearly impossible to include a multi-element lens.

Source: Project Home Page

14 Mar

Google Reader – my favorite website is shutting down – what are the alternatives?

unnamed

The Facts

In a move that I fail to understand Google announced on the Google Reader blog that they will be shutting down their service for good on 1st July 2013 due to ‘decreasing number of users’. I and many others probably don’t think of course this is the real reason, Google Reader is one of Google’s cheapest to run products but it probably hinders parts of their greater agenda to push their social media platform Google+ (i.e. if you subscribe to an RSS feed you don’t need to follow the page on Google+ to get updated, so removing your RSS reader might push more users to Google+).  Read More

13 Feb

PhpStorm – an IDE worth its name

Logo_phpstorm

I recently switched to JetBrains PhpStorm as my main IDE for PHP/HTML/JS/CSS development. I tried many solutions in the past such as Dreamweaver (please don’t try it), NetBeans, Aptana, Eclipse PDT, before settling with Zend Studio for quite sometime and finally a couple of months ago I gave ZendStudio the boot and switched to PhpStorm. I am currently using version 6.0 from the Early Access Program (the current stable is version 5) – and I am planning to buy it once 6.0 final is out. Read More

25 Nov

LaserVex – Very Challenging HTML5 Puzzle Game

screenshot

LaserVex is a very challenging optics based game. Each level has one or more laser sources, a series of mirrors, a number of targets all on the same plane. The aim of the game is to hit all targets just by moving the mirrors around without moving the laser sources. It sounds and looks simple at first but after going through the first 4-5 levels you will start facing some real challenges. Its one of the hardest puzzle games I’ve played in a while.

It has a lot of potential and should be made available as a mobile app. The graphics are lacking a bit (its all lines basically on a canvas) and the controls need some work (moving a mirror requires yo to move both vertices) but the gameplay makes up for it.

If you don’t have time to waste please don’t try this game. You’ve been warned.

Check it out here.