Posts

Showing posts with the label Image Detection

Getting started with Tesseract optical character recognition (OCR) library in Visual Studio

Image
This post is a how-to guide on how to get up and running with using the tesseract optical character recognition (OCR) library in a Microsoft Visual Studio environment. The original link can be found at the following github location: https://tesseract-ocr.github.io/tessdoc/Compiling.html#windows Step 1: Build the latest library (using Software Network client) Download and extract the latest SW (Software Network https://software-network.org/) client from the following location: https://software-network.org/client/sw-master-windows-client.zip Open a DOS command prompt and run the following commands: [code language="xml"] sw setup sw build org.sw.demo.google.tesseract.tesseract-master [/code] As shown in the following screenshot: Step 2: Install git if you have not already done so You will need git to download the libraries needed for this project. Download link for obtaining the git for Windows executables etc here: https://git-scm.com/download/win...

Using OpenCV for image handling operations

1. Load an image and display it [code language="cpp"] //Loads image and displays #include <opencv2/core/core.hpp> #include <opencv2/highgui/highgui.hpp> #include <iostream> int main() { cv::Mat image = cv::imread("spots2.jpg", CV_LOAD_IMAGE_COLOR); if( false == image.data ) { std::cout << "Could not open or find the image" << std::endl ; return -1; } cv::namedWindow( "Display window", cv::WINDOW_AUTOSIZE ); cv::imshow( "Display window", image ); cv::waitKey(0); return 0; } [/code] 2. Add a trackbar to blend two images [code language="cpp"] #include <cv.h> #include <highgui.h> const int alpha_slider_max = 100; int alpha_slider; double alpha; double beta; cv::Mat src1; cv::Mat src2; cv::Mat dst; void on_trackbar( int, void* ) { alpha = (double) alpha_slider/alpha_slider_max ; beta = ( 1.0 - alpha ); cv::add...

Using OpenCV to find and draw contours in video

Image
This is a very similar post to that posted previously, which used a OpenCV and cvBlobsLib to identify contours in video footage and display them on the screen. Please refer to this for detail on how to convert the Red, Green, Blue (RGB) format into Hue, Saturation, Value (HSV) format, and threshold the HSV into the black and white format needed for finding contours in OpenCV: https://www.technical-recipes.com/2011/track-colored-objects-in-video-using-opencv-and-cvblobslib/ This example achieves the same but without using the cvBlobsLib to identify contours / strongly connected components, just 100% OpenCV calls.

Configuring NetBeans to use OpenCV in Linux Environments

Image
A quick guide to setting up and installing OpenCV for using in the Netbeans integrated development environment in Linux. Step 1: Download and extract OpenCV for Linux Versions of OpenCV can be downloaded from here: http://opencv.org/downloads.html Save it to the location of your choice. Open a command prompt, navigate to the download location and unzip:

Configuring Code::Blocks to use OpenCV in Linux Environments

Image
A quick guide to setting up and installing OpenCV for using in the Code::Blocks integrated development environment in Linux. The version of Linux I am currently using is Ubuntu 14.04. At the time of writing the version of OpenCV for Linux used is 2.4.9. (I had originally tried version 2.4.10 but had problems compiling it with the version of gcc I had (4.8.2), so I reverted to 2.4.9 instead.)

Tracking Colored Objects in Video using OpenCV and cvBlobsLib

Image
As a newcomer to image processing, I have attempted to achieve the tracking of coloured objects in some sample video footage . In my case, my little one’s blue gloves moving in a snow-covered landscape (a bitterly cold Musselburgh allotments , December 2010).

Displaying AVI Video using OpenCV

Image
A short demonstration of how to use OpenCV to capture and display video frames from an avi file. The code demonstrates how to capture video from an example video (avi) file, get information in the form of frames per sec. and display the video.

Analyzing FlyCapture Images obtained from Flea Digital Cameras

Image
Flea2 Camera Physical Layout The photograph shows the physical setup for grabbing images from a Flea2 camera (by Point Gray Research ) mounted above a Xaar inket printer. This represents a prototype used to obtain images of microarray spots printed to glass sample slides, in “Format7” (partial image) mode, as the printhead moves across trays containing 25 microarray slides. Using the FlyCapture SDK The FlyCapture SDK provides methods for acting upon triggers from external pieces of hardware (in this case Xilinx FPGA boards) and retrieve the image buffer when receiving these prompts. What is more, it is possible to capture grayscale images directly from the camera, eliminating the need for colour-to-grayscale conversions in software. Obtaining acceptable camera settings interactively Assuming you have installed the full FlyCapture2 SDK, at the Start button, select All Programs -> Point Gray Research -> FlyCapture2 -> Examples -> Precompiled Examples -> Flycap2M...

Integrating the FlyCapture SDK for use with OpenCV

Image
Introduction A recent stab at grabbing images from the Flea2 camera using APIs from the FlyCapture2 SDK by Point Gray Research (PGR).  Additionally, the camera was to be used in  "Format 7 mode", so that we may grab partial regions of the complete image.

OpenCV Detection of Dark Objects Against Light Backgrounds

Image
The results of some experimentation with and comparison between raw OpenCV functions and the cvBlobsLib library to detect darker coloured spots against lighter backgrounds.

Getting Started with OpenCV in Visual Studio

Image
OpenCV is a free, open source library that enables your computer application to "see" and make decisions from the image data it acquires.  Here are some guides for setting up OpenCV for use in Microsoft Visual Studio Environments:

Object Detection Using the OpenCV / cvBlobsLib Libraries

Image
A short example of how to utilize various open source library functions that can be used to identify and analyse strongly connected components for a given input image. In the example I have given here, the image represents microarray sample spots printed to a slide using a Xaar inket printer.  Using our robotic equipment, a camera is mounted to the printhead, so that images are taken of the spots, as they are being printed on-the-fly, usually in linear groups of 12 or 32 at a time: