12-17-2009 11:19 AM
Problemdescription:
How can I extract any selected object from a given image without knowing the ROI in advance? For instance I have an image (monochrome) of a house where I would like to extract one window (my ROI) and save this ROI temporally to a template. This template needs to be used again for the next loaded image - again with the same house but from a different perspective for example.
Now I do have some difficulties to extract this ROI because is has to be selected automatically without knowing anything about the size, position of it. The only thing which is known is the starting point where the window is located. This starting point can be anywhere inside the window and is not necessarily the center point.
I did some tests with the "magic wall" which looked promising at the beginning. The problem is that you need to set the tolerance first before you extract the ROI. Otherwise you can not extract the complete window as a whole and it is only a fragment if the tolerance has been set to low level.
Question:
Is there a good way or an improved algorithm how I could extract such a ROI in a way that it can be used as a template for further images? In my opinion such a ROI needs to be extracted as a complete part which includes the borders or frame, in case of a window, to retrieve it again in the following image(s) where the house may be in a different position if the observer has moved.
Do I need a completely different algorithm than the magic wall or could I used it in a recursive way until the algorithm finds a transition in contrast for example to find the edges?
Thanks in advance
12-17-2009 10:32 PM
A few questions and suggestions
1. Is the wall's contrast predominantly different from the house.
1.1 If yes then apply the a proper threshold and particle filter to make sure only the window exists. Not you can extract the particle and using the bounding box as the reference.
1.2 If no then can you do contrast enhancement and then threshold and continue with the above step?
2. What does pattern matching give you (My guess is that it will be in consistent)
3. when the window size is changing the overall hpuse size will change? or remain more or less same? or not related?
12-19-2009 04:59 AM
Hi
pleae see my answers below in red:
1. Is the wall's contrast predominantly different from the house.
1.1 If yes then apply the a proper threshold and particle filter to make sure only the window exists. Not you can extract the particle and using the bounding box as the reference.
-> In general there is always a contrast difference between my ROI and the sourrounding environment. Keep in mind that my example with the house and window is just an example. Nevertheless if there is solution to solve "the window problem" I can easaly adapt it to other images I suppose. But how can I apply a propeer threshold if the algorithm has to do it automatically? In other words the algorithm needs to find the complete window size by itself. This means I do not know the optimal threshold in advance! The question is how can I determine the optimal threshold (automatically) to extract the complete window out of my image? Of course it is easy to do it manually but this threshold also differs if there are different houses or light conditions changes.
1.2 If no then can you do contrast enhancement and then threshold and continue with the above step?
-> Yes I can use all filters like contrast enhancement etc. I would need therefore. But again I dont know how to solve it (see answer in 1.1)
2. What does pattern matching give you (My guess is that it will be in consistent)
-> The pattern matching gives me the actual position of my template I extraced.
3. when the window size is changing the overall hpuse size will change? or remain more or less same? or not related?
-> The window size is not changing between the first image where the ROI (window) is extracted and the following images where the ROI (window) will be searched again to define its positon. So it will remain the same.
best regards
12-20-2009 11:17 PM
12-20-2009 11:18 PM
12-21-2009 03:16 AM
Hi
attached I have some image examples. As I already mentioned it can be ANYTHING, meaning it also could be the plate number, front shield of a car or even a pedestrian on a street. I choosed randomly this image where I extract one of the windows of the entire image. I would apreciate if you have an example where the adaptive threshold algorithm can be seen as you described.
thanks in advance
01-18-2010 02:04 AM
01-18-2010 02:11 AM
06-01-2010 02:56 AM
Hello Norick,
I have got a similar problem with you. Have you found a method to solve this problem? If so, please tell me how to do it.
Thanks in advance.
best regards
Guo Zhongge
06-01-2010 04:08 AM