Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How can I resize an image where the face should be cropped and scaled to fit the size?

My webcam takes images. But opencv gender classification needs the images to be of the same size of that of the images used to train. So I need my webcam images to be 300300 where the face in the webcam images would fit the resolution 300300. I have identified the face in the webcam image using opencv face cascade classifiers. But how can I crop that facce to fit in the size of 300*300? Please help with some code lines.