Ask Your Question

Tool for cropping positive samples

asked 2015-01-09 03:55:34 -0500

pierewoj gravatar image

I am working on a program which detects cans from a picture. I am using a cascade classifier to do that. To improve its quality I need to provide more positive samples. I have made many photos of cans from different angles and in different light settings. image description Long story short, I have around 100 photos (around 5 cans in each) and I need to crop all those cans into separate images. Cropping each one and exporting in GIMP is really slow. Is there any tool you could recommend to make this faster?

Thanks a lot in advance and sorry for my English!

edit retag flag offensive close merge delete


Your English is good, But would you mind give an example of pictures, and your need in output?

Mohammad Etemaddar gravatar imageMohammad Etemaddar ( 2015-01-09 04:00:39 -0500 )edit

1 answer

Sort by ยป oldest newest most voted

answered 2015-01-09 04:16:13 -0500

Basically you want an object annotation tool. I have written something like that using OpenCV in C++ as you can see here. I do not guarantee that it works but the basic idea is that you select the corner points of each object and acknowledge the selection with a button input to store it. You need to make file listings of your items beforehand. Once you get the hang of it this goes pretty fast. I am in the process of upgrading this towards a multi class system but that is not operational yet.

edit flag offensive delete link more



Thanks a lot, your program compiles without any problem but i cant figure out what arguments mean. The third argument is the output I guess. The second one is a txt file with a list of paths to the images. So what is the first one?

pierewoj gravatar imagepierewoj ( 2015-01-09 11:42:43 -0500 )edit

the first argument is a quick fix for deep folder work. Basically the software needs the absolute locations of files instead of the relative locations. Say your image is in /home/user/Documents/rootfolder/img1.png then you need to give the first argument the value /home/user/Documents/rootfolder/ and the second argument img1.png and the last one output.png!

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-09 12:31:16 -0500 )edit

A PR has been added for both 2.4 and master branch to get this tool included in the repository.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-29 06:55:53 -0500 )edit

Question Tools

1 follower


Asked: 2015-01-09 03:55:34 -0500

Seen: 729 times

Last updated: Jan 09 '15