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 300x300 where the face in the webcam images would fit the resolution 300x300.
I have identified the face in the webcam image using opencv face cascade classifiers.
But how can I crop that face to fit in the size of 300x300?
Please help with some code lines as I am new to opencv.
相关问题
- Sorting 3 numbers without branching [closed]
- How to get the background from multiple images by
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
- thread_local variables initialization
相关文章
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
- Converting glm::lookat matrix to quaternion and ba
- What is the correct way to declare and use a FILE
Here a small sample that will help you to crop and resize your faces:
Detected face:
Cropped face:
Resized face: