computer/machine vision question.

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

computer/machine vision question.

Jeffrey Roe
Hello List,

I have just have started to look into computer/machine vision. I am
looking to find out if some thing
is possible or am I expecting too much from computer/machine vision. I
have a 2d image see example attached, I want to get the coordinates of
the outlines of the shapes. The edges of the shape will always be
black and the background will be white, it can be any sort of shape
.First I am looking to see if it can be done , and second a point in
the right direction as to how it is done.This forms a part of a larger
application I am writing in c++.

Thanks
Jeffrey Roe,


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

Reply | Threaded
Open this post in threaded view
|

Re: computer/machine vision question.

Stefán Freyr Stefánsson
Hi.

I don't see the attached image that you mention in your email.

But if I understand your message correctly you could do something like the
following:

1) convert the image to grayscale
2) threshold the image to produce a binary (black/white) image so that the
objects are black and the background is white (google for cvThreshold or
cvAdaptiveThreshold for more information).
3) use cvFindContours to draw the contours of the objects (you can use
cvDrawContours to do that for you).

I'm attaching an example application that pretty much does exactly what you
need I think.

This example code is from the excellent book "Learning OpenCV". I highly
recommend getting a copy of it.

Best regards, Stefan Freyr.

On Thu, Jun 4, 2009 at 10:16 AM, Jeffrey Roe <[hidden email]> wrote:

>
>
> Hello List,
>
> I have just have started to look into computer/machine vision. I am
> looking to find out if some thing
> is possible or am I expecting too much from computer/machine vision. I
> have a 2d image see example attached, I want to get the coordinates of
> the outlines of the shapes. The edges of the shape will always be
> black and the background will be white, it can be any sort of shape
> .First I am looking to see if it can be done , and second a point in
> the right direction as to how it is done.This forms a part of a larger
> application I am writing in c++.
>
> Thanks
> Jeffrey Roe,
>
> [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
|

Re: computer/machine vision question.

Jeffrey Roe
Here is a copy of the image i have http://yfrog.com/5dtestfzpj
I will have a look at your code now thanks
Jeffrey Roe,



2009/6/4 Stefán Freyr Stefánsson <[hidden email]>:

> Hi.
>
> I don't see the attached image that you mention in your email.
>
> But if I understand your message correctly you could do something like the
> following:
>
> 1) convert the image to grayscale
> 2) threshold the image to produce a binary (black/white) image so that the
> objects are black and the background is white (google for cvThreshold or
> cvAdaptiveThreshold for more information).
> 3) use cvFindContours to draw the contours of the objects (you can use
> cvDrawContours to do that for you).
>
> I'm attaching an example application that pretty much does exactly what you
> need I think.
>
> This example code is from the excellent book "Learning OpenCV". I highly
> recommend getting a copy of it.
>
> Best regards, Stefan Freyr.
>
> On Thu, Jun 4, 2009 at 10:16 AM, Jeffrey Roe <[hidden email]> wrote:
>>
>>
>> Hello List,
>>
>> I have just have started to look into computer/machine vision. I am
>> looking to find out if some thing
>> is possible or am I expecting too much from computer/machine vision. I
>> have a 2d image see example attached, I want to get the coordinates of
>> the outlines of the shapes. The edges of the shape will always be
>> black and the background will be white, it can be any sort of shape
>> .First I am looking to see if it can be done , and second a point in
>> the right direction as to how it is done.This forms a part of a larger
>> application I am writing in c++.
>>
>> Thanks
>> Jeffrey Roe,
>>
>> [Non-text portions of this message have been removed]
>>
>>
>