Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

extract_images documentation #5

Closed
CJRobey opened this issue Jun 12, 2018 · 7 comments
Closed

extract_images documentation #5

CJRobey opened this issue Jun 12, 2018 · 7 comments

Comments

@CJRobey
Copy link

CJRobey commented Jun 12, 2018

I am currently trying to use the extract_images.cpp file for a different application (figurine model dogs) and it is fairly unclear what the arguments are doing in the r_box struct and how the code works as a whole.

Can there be some more documentation on how this file operates? In my opinion it could be extremely useful for generic industry use, but right now it is very unclear.

@mihaioltean
Copy link
Collaborator

t_box is type for defining a rectangular bounding box . Corners of the box are stored in min and max data members.

Now I have added more comments in the source code. Please tell me which part you do not understand.

Please note that the background should note have too many fluctuations. In our case we have placed a white sheet of paper behind the fruits. Still, white paper does not mean white background on movie (mainly due shadows). If your background is very varied you need some more complex algorithms ... check for the image segmentation problem.

@CJRobey
Copy link
Author

CJRobey commented Jun 12, 2018

image_screenshot_12 06 2018

I don't know how to increase the size of the box though. I'm only getting very partial images as the one above. Whenever I try to do that, I either get an error from OpenCV or the dimensions become very strange.

How should I edit the line in fruits_definition.h to increase this parameter properly?

Rect r_box(705, 205, 205, 205);

@mihaioltean
Copy link
Collaborator

send me the full image.

@CJRobey
Copy link
Author

CJRobey commented Jun 12, 2018

cocker_spaniel_364

@mihaioltean
Copy link
Collaborator

0_540

Something like this. The algorithm cannot do more ... there is too much shadow between the dogs legs.

@CJRobey
Copy link
Author

CJRobey commented Jun 12, 2018 via email

@mihaioltean
Copy link
Collaborator

Rect r_box(390, 180, 540, 540);
#define motor_shaft_height 1
#define color_distance 3

However, some changes are required in the main function because the program is intended to work with movies not with images.

Also, update to the latest version because I fixed a problem: I worked with "smaller_image_size" constant (which was defined as 100) but somewhere in the program I used value 100 ... maybe this is why you got crash if you changed the smaller_image_size.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants