python - Detect and count objects in an image -
I am trying to write a picture in Python so that one can locate and count objects within an image, But I have failed miserably.
This is the first time that I am interested and trying something through computer vision. After the tutorial about the feature matching and template matching current, I have tried to use the CV2 module (Open CV). I have also tried with the schemkit-image but I can not get a good result. I have also thought about finding outline and then matching 2D-curve.
Explain me a little more problem. I have a set of icons which make a big image. The structure of this image or the scene is done by a simple background or transparent multiple images from another ikeetet. These pictures from Iconset can basically go through 3 basic changes: scale, rotation, and translation. They can also overlap.
The output of the desired script will be something like this:
C -> 1
D -> 1
<->
->
J -> 0
I am going to try with the delibah now and see if I can achieve anything with machine learning algorithms. I think I am trying to solve my problem which is really necessary. Any advice on how to do this will be great, I am also open for any library for dragon.
PS: Sorry to not publish images here, but I do not have enough reputation yet.
There are many techniques you can try but if you really want to make something quick and easy , Then try to organize your image so that each category clearly has unique and unique colors. In this way, you can calculate better than some of the object appearance, or the number of specific color by searching your color.
Pseudo-code:
- Pre-process image -
- For each contour check that this valid "feature" is contour -
It may also be that you can filter some noisy areas further by moving forward later by using the backpages function. gives you very good performance, otherwise you will have to make some assumptions on the icon 'scale, rotation, interception / overlapping conditions.
Comments
Post a Comment