Monday, October 3, 2011
Monday, September 19, 2011
Select and Move Objects/Points using OpenCV
This post explains how to use the OpenCV to select and move the objects.
Before the explanations, watch this video to get the idea.
- As you can see, the controls are based on the mouse movements and clicks.
- Left button down – select the object of clicked point - findImg( x, y)
- Left button up – release the object if there any objects has been picked - releaseImg(selectedImg,x,y)
- On mouse move – move the selected object with mouse
void mouseHandler(int event, int x, int y, int flags, void *param) { switch(event) { case CV_EVENT_LBUTTONDOWN: //left button press selectedImg=findImg( x, y); break; case CV_EVENT_LBUTTONUP: //left mouse button release if((selectedImg!=NULL)&&point!=-1){ releaseImg(selectedImg,x,y); selectedImg=NULL; } break; case CV_EVENT_MOUSEMOVE: /* draw a rectangle*/ if(point!=-1){ if(selectedImg!=NULL){ temp = cvCloneImage(selectedImg); cvRectangle(temp, cvPoint(x - 1, y - 1), cvPoint(x + 1, y + 1), cvScalar(0, 0, 255,0), 2, 8, 0); //adjust the lines for(int i=0;i<nop;i++){ if(i!=point){ cvLine(temp, cvPoint(x,y ), cvPoint(globalCoordinateX[i] , globalCoordinateY[i] ), cvScalar(0, 0, 255,0), 1,8,0); } } cvShowImage("Drag & Drop", temp); } break; } cvReleaseImage(&temp); } }
- Then implement the logic for the findImg( x, y) & releaseImg(selectedImg,x,y) methods according to your requirements.
- Here i used an integer array to store the initial position of each object.
- Then search for object using the x & y coordinates when there is a click.
- when releasing the object update the integer array with released coordinate.
- Finally call the cvSetMouseCallback( "Drag & Drop", mouseHandler, NULL ) to activate the mouse handler to the window. where;
- "Drag & Drop" - the OpenCV window name
- mouseHandler - the mouse handler function name.
Saturday, September 17, 2011
Saturday, September 3, 2011
Testing of Age progression on murali's face
This video show the age progression on muralis' face in 3D
Friday, August 5, 2011
FAPS - Video demo of creating 3D face model from single image
As a part of our project we developed the 3D face model of given image by marking the critical points of the face.
Tuesday, November 9, 2010
What's FaceAPS all about. . .
Face Age Progression
It is process of modifying an image of a person that showing his/her faces in order to predict how he/she will look like in future. To develop a computer based automatic face age progression system we need to consider how the shape of human faces changes with parallel to aging.
FaceAPS - Face Age Progression System
Face Age Progression can be done by manual drawing but in our system we computerize the process of age progression.
Face Age Progression Factors
Human faces undergo considerable amount of change with parallel to the natural aging and this changing pattern becomes more complex with the human variation of factors such as gender, population of origin, body size, weight, and idiosyncratic behavior. In the essence of developing a computer based age progression system we can consider about following factors of human aging such as craniofacial remodeling and soft-tissue degeneration, other major factors affecting appearance over age include weight pros, sun exposure, ancestry, sex, health, disease, drug use, diet, sleep deprivation, bio-mechanical factors, gravity, and hyper-dynamic facial expressions. So building a computer based automatic age progression system becomes more complex and challenging.
Current Systems
Currently there are many number of researches have been done and there are many researches ongoing addressing this problem using various kinds of methods and various algorithms. These researches are mainly done on European context, so our aim is to research whether is there any suitable methods and algorithms that can modified to use on Sri Lankan context. So our project idea is focused on finding a new algorithm and a method that can be used to develop a computer based face age progression system on Sri Lankan context.
Subscribe to:
Posts (Atom)