I am currently using opencv, image and pygame for capturing frames from a hd webcam. What I want to achieve is to check if the captured frames are focused or not. This is aka focus testing but I couldn't come up with a solution in Python. IMHO problem can be reduced to determining the blurness percentage of each pixel and come up with a decision. What is the name of this algorithm I am seeking for ? Does anyone have any experience implementing similar algorithms in Python ?
I would appreciate any guidance.
If you want to check if an image is blurry this Is there a way to detect if an image is blurry? might be able to help you, pretty interesting.
Related
I'm training a computer vision algorithm, and I want to give it some more robust data. For the application of the software I'm building, oftentimes people will take pictures of their computer screen with their phones and use those images, rather than the actual original image file to run the computer vision on.
Do you know what kind of transformations I can make to my already labeled image dataset to emulate what it would look like if someone used a cellphone to take a picture of a screen?
Like some qualities demonstrated below in the sample image of my screen for this question:
I guess this is what I'm thinking so far conceptually, but I'm not sure what libraries to use in Python:
The image resolution will probably drop, so modulating that to be lower or more commensurate with what a cellphone's granularity is
Adding in random color aberrations to the images, because when you take pictures of screens it seems like mini rainbows form?
Warping the angle the image is viewed at, since when someone takes a photo, they may not be taking it perfectly square/flat
Adding pixel-looking grids to the images to make them look more like the images taken of screens.
Is there anything I missed and do yall have any library recommendations or starting code to help me? I really want to avoid relabelling all of my data...
Thanks in advance!
I found this: https://graphicdesign.stackexchange.com/a/14001
It seems to be exactly what I'm looking for, but how do I translate this into code? Any library recommendations?
So I have been asked to motion deblur a frame captured from a video, I am kind of new to this deblur filters so need help. The video does not contain any noise, just a vertical motion blur. I am not allowed to use skimage, or any other library except cv2. It would be a great help even if what technique or function I have to use comes to know. Thanks!
You can use the Motion Deblur Filter of opencv, if you specifically want to use opencv.
Following is the link to its documentation, which is fairly easy to understand:
http://amroamroamro.github.io/mexopencv/opencv/weiner_deconvolution_demo_gui.html
You can go for skimage as well. It has many function like deconvolution which can help in deblurring images.
I think that for this kind of problem you have to use the recent deep learning techniques. They outperform the classical approaches. I recommend to look on github for a repository that would already provide a trained network that can deblur the same kind of blur that you have.
I never tried it, but this could be a nice candidate.
Good day. I have this set of geotagged photos. I want to build a system which approximate the location of a query image based on how similar it is from the geotagged photos. I will be using python and opencv to accomplish this task. However, the problem is that most of the geotagged photos have people on it (I'm only after the background scenery).
I found some face detection algorithms that I can use to detect people on photos. However, what I need is to detect the whole body of the people in the images and just leave out the background.
Opencv have algorithms which can be used in removing background (I was hoping to reverse the output and leave the background instead). However, this is only applicable to videos (subtracting static with moving parts). Can you guys recommend any solution to this problem (where to start/ related studies/ algorithms)? I appreciate any help. Thanks!
I am new to the computer vision area and i have been given this task,
I need to recognize an amount of images with a camera as soon as they enter the camera focus, this images would be scanned previously and stored in some sort of database.(maybe the key-points collection to each image)
well, i've been doing some research and found that SIFT may do the trick but i don't know how to use it properly, i need to do this on Python-opencv
Note: I already found examples in which I can get the key-points on an image using SIFT, but the code is very confusing to someone who does not know the language, any help is appreciated.
Here is a good page for you to get started and learn the basics along the way.
I am trying to detect a marker in a webcam video feed and overlay it with a 3d object - pretty much exactly like this: http://www.morethantechnical.com/2009/06/28/augmented-reality-with-nyartoolkit-opencv-opengl/
I know artoolkit is the best module for this, but I was hoping to just use opencv in python since I dont know nearly enough c/c++ to be able to use artoolkit. I am hoping someone will be able to get me on the right track towards detecting the marker and determining its location and orientation etc since I have no idea how best to go about this or what functions I should be using.
OpenCV doesn't have marker detection / tracking functionality out of box. However it provides all algorithms needed so it's fairly easy to implement your own one.
The article you are referring to uses OpenCV only for video grabbing. The marker detection is done by NyARToolkit which is derived from ARToolkit. NyARToolkit have versions for Java, C# and ActionScript.
ARToolkit is mostly written in plain C without using fancy C++ features. It's probably easier to use than you thought. The documentation contains well explained tutorials. e.g http://www.hitl.washington.edu/artoolkit/documentation/devstartup.htm
The introductory documentation can help you understand the process of marker detection even if you decide not to use ARToolkit.
I think the most used way to perform marker detection using python and open CV is to use SURF Descriptors.
I have found very useful this video and the linked code you can find in this page. Here you can download the code. I don't know how to overlay it with a 3d object but I'm sure you can do something with pygame or matplotlib.