I'm using opencv and face recognition model to detect and Identify the face in webcam.
I saw that all Images in folder are encoded once then search faces .. but if I add the image in runtime it'll not pick up that image
can anyone help , how to load images in runtime if Images are not found in particular folder
Thanks,
Chiranjit
Related
First of all, I am a beginner in computer vision field, learning OpenCV from the web.
What I am trying is stitching multispectral (bands > 3) images with OpenCV stitching APIs.
I already know that OpenCV doesn't support multispectral image.
So, the idea I came up with is as follows:
Extract the RGB images from each multispectral image.
Use cv2.Stitcher_create() and stitcher.stitch class to stitch all the RGB images (reference: https://pyimagesearch.com/2018/12/17/image-stitching-with-opencv-and-python/). And save the warping and arrangement informations (ex. Homography, matching keypoints...) in making RGB panorama.
Stitch each remaining bands' image by loading the informations that saved in step 2.
The problem is, I can't find the codes for the saving and loading informations that required in step 2 and 3.
Is the suggested method possible? And if possible, is there any tips or references that I can use?
Yes you can do it (I did it before for my paper on stitching construction plans). You need to save the camera parameters after the feature matching and probably also the seam masks.
Look here (cameras) and here (seam masks)
I have store the image in sqlite3 database using BLOB datatype and I need to extract that image for facial recognition . I have been using face recognition package to do so. The problem is i am not able to use extracted image for encoding and other operation. So, I think I have to change the datatype of the image for further processing but I am not able to find so.
The error for the code is:
RuntimeError: Unsupported image type, must be 8bit gray or RGB image.
The problem is you need to properly read the face images.
There are multiple libraries for that operation. For instance: opencv, Pillow, skimage, etc.
Here is an example of how you can read the face image:
from PIL import Image
for face in data:
face_array = Image.open(face)
Is there a way to track down and nicely blur faces or part of face (like hair) for multiple 360 degree images via python opencv. ? I'am using Windows OS and python3.8
Two methods with opencv and python
Using a Gaussian blur to anonymize faces in images and video streams
Applying a “pixelated blur” effect to anonymize faces in images and video
The method is well explained here and you can access code.
Now, a more advance solution if you are using GPU, and you want to run the application on a live video stream.. its with nvidia DS and Deep Learning. The github here reports results on T4, i believe you should be able to run it on Jetson nano. Here is the link
Yes, there is. First you need to detect the face(s) using Haar-cascade, which will provide you the rectangle coordinates of the face location. Then you can use this answer to blur the desired portion of an image.
I am working on a Image detection problem in opencv for which I need to save many images.
These images are required to be accessed frequently so I wanted to store these images in IPL image format . All these images are grayscale images .
What I wanted to ask is what is the best method to handle all these Images ? Should I store them in a database or a file system ?
Any help would be highly appreciated.
I'm starting with openCV and Python, and I need to do the following tasks:
Get the profile picture of a person, detect the face and save it
Use the saved face as the replacement of a puppet head in a video
Point 1 is already done.
Can you help me with point 2?
Kind regards and thanks in advance.
You can detect the puppet face and replace it with the image that you got cropped out from the profile picture.
Try out detecting faces with the same algorithm (Probably you used Haar Object Detection) on the puppet video and see if it's detecting. If it's detecting the puppet face, simply get the co-ordinates and replace it with the face. Check out this question.
If the puppet face is not too similar with a human face you will need Haar Templates to detect the Puppet head on the video. For that you would have to prepare a template yourself. Look into this link.
Also look into this link. It's in C but you can convert it to Python without much effort.