This is a short Processing sketch to demonstrate the use optical character recognition (OCR) with the Tesseract OCR engine. I used the Mac OSX platform for testing. Here are the steps.
The new Processing 3.0 beta is available in the Processing website for download. There are some changes in the internal operations that we may need to pay attention to in case our programs depend on them.
Here is a sketch with 2D graphics, I try to list out those internal hidden variables and functions, especially those related to the PSurface class.
Continue reading “Processing 3.0 Beta 1”
It is a short side project away from the OpenCV and Processing thread. In this example, I would like to see if I can load an external class within a Processing sketch. The structure of the program is:
To simplify the use of a dynamic mask with image, I try to use the PGraphics class as an off screen buffer to store the image for a subsequent mask operation. The foreground image is the live video input from the webcam. The mouse drag operation will draw a dynamic mask to reveal the webcam image. It makes use of the fact that the PGraphics class is a subclass of PImage. The mask function can directly take the PGraphics instance as input. Here is a sample screen shot.
Continue reading “Processing Test with the PGraphics”
The second performance test is to compare the performance among three ways to copy from one PImage to another with exactly the same size. The first method uses the PImage.copy function. The second method use the arrayCopy function to copy directly from one pixels array to another. The third method uses a linear loop to traverse the pixels array one by one.
Continue reading “Processing Performance Test 2”
I try to compare various methods to handle mainly image-based computer graphics in the Processing environment and publish the results for developers’ reference. The first one is a very straightforward test by comparing two ways to modify all pixels in a single PImage object instance.
Here are another testing images with the use of OpenCV optical flow algorithms to render a number of classic film sequences.
- Beauty and the Beast
- Lady and the Tramp
- Some Like it Hot
- The Princess Bride
Continue reading “HTML5 Canvas Animation Test”
The following Processing codes demonstrate the use of the OpenCV Features2D to detect key points from the webcam image. It is the first part of a more complex task to identify 3D motion from a 2D image.