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.
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)
Is there any predefined code for this or I have to write my own code?
Also, I do not have the camera properties for this, I have only the image taken in fisheye lens and now I have to flatten the images
OpenCV provides a module for working with fisheye images: https://docs.opencv.org/3.4/db/d58/group__calib3d__fisheye.html
This is a tutorial with an example application.
Keep in mind that your task might be a bit hard to achieve since the problem is under-determined. If you have some cues in the image (such as straight lines), that might help. Otherwise, you should seek a way of getting more information about the lens. If it's a known lens type, you might find calibration info online. Also, some images might have the lens used to capture them in the EXIF data.
How can I use Python and OpenCV to find facial similarity?
I've successfully used OpenCV and Python to extract faces from multiple photographs using Haar Cascades.
I now have a directory of images, all of which are faces of different people.
What I'd like to do is take a sample image, and then see which face it most looks like.
I've tried using pyssim:
pyssim needle.jpg "haystack/*"
But, unfortunately, it's looking a image similarity (colours etc) rather than facial features.
To reiterate - I'm quite happy detecting faces, what I'd like to be able to do is compare them.
I'm new to Open CV and image processing, but I was wondering if I have a still image, say a jpeg file is it possible to run Open CV or another package on the image and have it identify where the humans are in the image? (I don't know if that sounds impossible or not since I haven't worked much in this but any advice would be appreciated) The photos are from the raspberry pi, which takes a photo after a PIR motion scanner detects movement.
You can use opencv for this. Opencv Hog descriptor may help you for this. Opencv can be used in rasberry pi as well.
Here is the link for the people detection code, or you can find it in samples of the opencv package.
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.