Histogram and backprojection windows, in black

asked 2014-04-11 03:45:07 -0500

Inaki gravatar image

updated 2014-04-11 09:49:50 -0500

Hello:

I have a problem:

I made a program to detect a red circle, and once detected to track it with camshift.

I tsuposed to work, but now I have a problem:

when I run the program (with a video file), I can see the "normal"window (the window whit the video file) correctly, but the histogram window or the window with the backprojection mode are in black (sometimes i can see some white points, but it doesn´t work well).

What can be the problem? What do you think? Where would you look? Ideas?

Thanks!!

EDITED:

now you can see a screeshot of what happens when I run the program.

the "Detection" window shows the input video (with some changes);

in the "Filter" window should appear the backprojection of the tracked object (the red circle), but something is wrong, the only thing that you can see are some white points in the place of the tracked object;

in the "histogram" window should appear the histogram (predominantly red), but neither appears.

Where do you think that can be the problem? Ideas to star searching?

Thanks!!!!!!

image description

edit retag flag offensive close merge delete

Comments

Did you add a waitKey(1) after all visualisations? It is needed to render the windows correctly.

StevenPuttemans gravatar imageStevenPuttemans ( 2014-04-11 03:50:04 -0500 )edit

Hi!

First, thanks for your comment. But that´s not the problem , I think.

I don´t know if there is something wrong doing the backprojection, or what happens.

In the next post I am gioing to shoy (if I can) a screenshot of what happens when I run the program.

Inaki gravatar imageInaki ( 2014-04-11 09:38:34 -0500 )edit

Start by adding a pastebin link to your sourcecode .. it might help us figure out what goes wrong!

StevenPuttemans gravatar imageStevenPuttemans ( 2014-04-14 02:39:45 -0500 )edit