shadow remove hsv

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

shadow remove hsv

mattia lipreri
Hello,
I'm trying to separate shadow from my foreground that i retrieved from
segmentation.
I'm using hsv map to do it.

// coloured image
tempColorImage = cvCreateImage(cvSize(width,height), IPL_DEPTH_8U, 3);
//...load image

// hsv image
hsvImage = cvCreateImage(cvSize(width,height), IPL_DEPTH_8U, 3);

// convert
cvCvtColor( tempColorImage, hsvImage , CV_RGB2HSV);

Now have I to apply some thresholds on hsvImage? Any hint?
I'm pretty confused.
Thank you,
--

while ( ! ( succeed = try() ) );

Mattia Lipreri


[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: shadow remove hsv

basel666666
hello
please help me
when I want to run an application with visual c++ with opencv, I receive this error: illegal instruction
please help me



     

[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: shadow remove hsv

Valquiria
In reply to this post by mattia lipreri
Mattia after convet RGB to HSV you may work with the Value and saturation.



One characteristic of shadow is your intensity (channel V) is low. It lie in
a Range between lower and high Value, you will need discover your.  Other
characteristic is the saturation is lower. Frequently the object (caster)
have high saturation.

You can used the command cvCvtPixToPlane follow a example of my code:



// convert from RGB to HSV

            cvCvtColor( src, hsv, CV_BGR2HSV );

 //separa(split channel) os canais hue, saturation, value.

            cvCvtPixToPlane( hsv, h_plane, s_plane, v_plane, 0 );



I applied the threshold in V to separate shadow of object. After other in
saturation. But I am working with a mobile robot (camera) in a constrain
enviorment. I studied so much about shadows, so if that didn't help you. We
can try another way.





Valquiria


2009/1/9 mattia lipreri <[hidden email]>

>   Hello,
> I'm trying to separate shadow from my foreground that i retrieved from
> segmentation.
> I'm using hsv map to do it.
>
> // coloured image
> tempColorImage = cvCreateImage(cvSize(width,height), IPL_DEPTH_8U, 3);
> //...load image
>
> // hsv image
> hsvImage = cvCreateImage(cvSize(width,height), IPL_DEPTH_8U, 3);
>
> // convert
> cvCvtColor( tempColorImage, hsvImage , CV_RGB2HSV);
>
> Now have I to apply some thresholds on hsvImage? Any hint?
> I'm pretty confused.
> Thank you,
> --
>
> while ( ! ( succeed = try() ) );
>
> Mattia Lipreri
>
> [Non-text portions of this message have been removed]
>
>  
>


[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Breaking a curve into line segments

HoangNguyen
I'm looking for an algorithm that breaks an arbitrary curve into line segments, satisfying some criteria (e.g: optimizing some error function). Anybody got any hint?

Thanks
Hoang



      New Email addresses available on Yahoo!
Get the Email name you&#39;ve always wanted on the new @ymail and @rocketmail.
Hurry before someone else does!
http://mail.promotions.yahoo.com/newdomains/aa/

[Non-text portions of this message have been removed]

Reply | Threaded
Open this post in threaded view
|

Re: Breaking a curve into line segments

hijstr
You could write a Recursive Boundary Splitting algorithm.

Basically (treating the curve as a sequence of points) , to begin
with you create a line between the start point of the curve, and the
end point of the curve.

Taking the line you have created, you find the point along the curve
"furthest" from that line. That means iterating through the curves
points (between the start and endpoint), and measuring its distance to
the line from each point.
Once you have found the furthest point, you split the curve at that
point. So instead of having one line from the start point to the end
point, you now have two lines: one from the start point to the point
you found (the furthest point from the old line) and a second from the
point you found to the end point.
Taking the lefmost line, you do the same as above, and  split it again
at the point furthest from the line. Now the curve has 3 lines
approximating it. You continue to split the lines into smaller and
smaller segments until you have met some predefined criteria (This is
usually that the furthest point from your line is under a certain
distance)
 The nice thing about this algorithm, is that it can be done recursively.

Hopefully you understand what I am saying as it's a kind of difficult
to explain in words! I have some code (not opencv though) that might
explain it better if you would like

Have a look here:
http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm
http://cs.joensuu.fi/~koles/approximation/Ch3_2.html



--- In [hidden email], HoangNguyen <hoangnguyen79@...> wrote:
>
> I'm looking for an algorithm that breaks an arbitrary curve into
line segments, satisfying some criteria (e.g: optimizing some error
function). Anybody got any hint?
>
> Thanks
> Hoang
>
>
>
>       New Email addresses available on Yahoo!
> Get the Email name you&#39;ve always wanted on the new @ymail and
@rocketmail.
> Hurry before someone else does!
> http://mail.promotions.yahoo.com/newdomains/aa/
>
> [Non-text portions of this message have been removed]
>