Ask Your Question
1

Object Extraction from Background

asked 2017-03-03 12:55:23 -0600

Lafi gravatar image

Hello, i'm working on a project for extracting objets from background : the input i have is an image for the background and a second image for those object in the same background

those 2 images are take with the same camera but not with the same position(the positio of the camera could be a little differente)

i have subtract those two images(background_image - second image) , it didnt' give an accurate result due to :

that i need to align those 2 images first(rotation, translatio, scale..) also there is athe shadow problem !!! How i can fix it?? any solution and suggestion please?

here is a simple images :

background image :

image description

second image with objects :

image description

result image(subtraction ) :

image description

Thank you

Lafi

edit retag flag offensive close merge delete

Comments

Search for Object Detection / Object Classification on Google. It will maybe open your eyes / mind on how to do things in today times :-)

holger gravatar imageholger ( 2019-09-25 19:12:58 -0600 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2019-09-26 19:16:30 -0600

Martian gravatar image

There are two possible general approaches to this. The normal OpenCV adaptive background subtraction methods are effective for still frames. You could try blurring algorithms or combinations of erode-dilate if you have problems with the grid lines, but that could also be solved with judicious thresholding settings.

The other approach is to search for background subtraction for video. Many texts cover this. It's normal to track moving objects, so you should be able to find algorithms that deal with position shifts.

If you are always using grid lines in the background, you could conceivably detect vertical and horizontal lines (via Hough or whatever), and try to use the locations for alignment. I'd expect that approach to be more pain than it's worth though.

edit flag offensive delete link more
-2

answered 2019-09-25 08:47:51 -0600

CV gravatar image

Try to convert both images to binary then use AND (Logic gate) bitwise_and ....

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2017-03-03 12:55:23 -0600

Seen: 581 times

Last updated: Sep 26 '19