C++Talk.NET Forum Index C++Talk.NET
C++ language newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Pixel Manipulations

 
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++)
View previous topic :: View next topic  
Author Message
PyPK
Guest





PostPosted: Wed Sep 28, 2005 8:38 pm    Post subject: Pixel Manipulations Reply with quote



Does anyone know of a simple implementation for detecting straight line
..So something like if we have a 2D arary of pixel elements representing
a particular Image. How can we identify lines in this Image.
for example:

ary =
{{1,1,1,1,1},
{1,1,0,0,0},
{1,0,1,0,0},
{1,0,0,1,0},
{1,0,0,0,1}}
So if 'ary' represents pxl of an image which has a horizontal line(row
0),a vertical line(col 0) and a diagonal line(diagonal of ary). then
basically I want identify any horizontal or vertical or diagonal line
anywhere in the pxl array and return true if its composed of only lines
else false...

Back to top
Howard
Guest





PostPosted: Wed Sep 28, 2005 8:45 pm    Post subject: Re: Pixel Manipulations Reply with quote




"PyPK" <superprad (AT) gmail (DOT) com> wrote

Quote:
Does anyone know of a simple implementation for detecting straight line
.So something like if we have a 2D arary of pixel elements representing
a particular Image. How can we identify lines in this Image.
for example:

ary =
{{1,1,1,1,1},
{1,1,0,0,0},
{1,0,1,0,0},
{1,0,0,1,0},
{1,0,0,0,1}}
So if 'ary' represents pxl of an image which has a horizontal line(row
0),a vertical line(col 0) and a diagonal line(diagonal of ary). then
basically I want identify any horizontal or vertical or diagonal line
anywhere in the pxl array and return true if its composed of only lines
else false...


Not really a c++ language question, but...

Loop through that row or column (or diagonal), and if any cell is 0, return
false. Otherwise, return true if the loop completes.

Implement that in c++ code, and if you have trouble, show us your attempt at
the code, let us know exactly which part is the problem, and what that
problem is (i.e., you get a compiler error, a run-time error, or simply
incorrect behavior).

-Howrd




Back to top
Victor Bazarov
Guest





PostPosted: Wed Sep 28, 2005 8:47 pm    Post subject: Re: Pixel Manipulations Reply with quote



PyPK wrote:
Quote:
Does anyone know of a simple implementation for detecting straight line
.So something like if we have a 2D arary of pixel elements representing
a particular Image. How can we identify lines in this Image.
for example:

ary =
{{1,1,1,1,1},
{1,1,0,0,0},
{1,0,1,0,0},
{1,0,0,1,0},
{1,0,0,0,1}}
So if 'ary' represents pxl of an image which has a horizontal line(row
0),a vertical line(col 0) and a diagonal line(diagonal of ary). then
basically I want identify any horizontal or vertical or diagonal line
anywhere in the pxl array and return true if its composed of only lines
else false...

Do you have a C++ _language_ question?

V

Back to top
ajitho
Guest





PostPosted: Thu Sep 29, 2005 2:25 am    Post subject: Re: Pixel Manipulations Reply with quote

Hi:
Look up the "Hough transform"

Back to top
PyPK
Guest





PostPosted: Thu Sep 29, 2005 3:38 pm    Post subject: Re: Pixel Manipulations Reply with quote

was trying to understand it..is there any demo code that could
demonstrate its behaviour

Back to top
Victor Bazarov
Guest





PostPosted: Thu Sep 29, 2005 3:51 pm    Post subject: Re: Pixel Manipulations Reply with quote

PyPK wrote:
Quote:
was trying to understand it..is there any demo code that could
demonstrate its behaviour


There probably is. Try googling for it.

Again, any particular algorithms for doing something particular are
not really on topic here. Try a different newsgroup.

V

Back to top
mlimber
Guest





PostPosted: Thu Sep 29, 2005 4:00 pm    Post subject: Re: Pixel Manipulations Reply with quote

PyPK wrote:
Quote:
was trying to understand it..is there any demo code that could
demonstrate its behaviour

The key word for this concept is "edge detection". Any book on image
processing will cover it, and I'm sure you can find some code online.
If you have a C++ question, post it here. Otherwise, you should
probably post to sci.image.processing or comp.dsp.

Cheers! --M


Back to top
Display posts from previous:   
Post new topic   Reply to topic    C++Talk.NET Forum Index -> C++ language (comp.lang.c++) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.