Sunday, 10 June 2012

Select And Save - An application

This post is just to give an intro to a small and simple application I wrote which I named after what it does "Select and Save". The idea is very simple, you want to save an image or part of an image from your webcam, and at the same time sort them into a series of files with distinct but well defined names.

When you start the application, it shows a window with the webcam output and a console window for instructions. There are basically two functions which can be performed, while the capture window is in focus. These functions are explained below:

Capturing the whole frame
This is a very simple function, it captures the whole frame and saves it, as a 640x480 jpg, into a file named in a format which I will discuss towards the end of this post.

Capturing a region within the frame
This function might replace most commonly used 'cropping-the-image' by some photo tool methods. The main aim of this function is to capture only the information selected by the user. The implementation is simple and natural. You just have to point, click down, drag to required region and viola!!

Now some word about the file name format. The files are stored in the folder where the application is running, with the following format:
Image-YEAR-MM-DD_HR_MIN_SEC.jpg
This name takes the current local date and time, which is really distinct for two images taken, considering they are not taken within a second of each other.

Here are some screenshots of how it actually works:


Selecting a region using mouse


Selected Region output


Finally here is the link for binary for this project: mouseSelectAndSave
It uses OpenCV libraries, which I have copied inside the application folder, just in case you dont have OpenCV installed or have different version than mine.



No comments:

Post a Comment