Isolating a pixel pattern in an image

Ken Ray kray at sonsothunder.com
Tue Jul 31 23:25:42 EDT 2007


On Tue, 31 Jul 2007 16:54:02 -0700, Brian Yennie wrote:

> You'll probably want to search through the imageData of the image. 
> ImageData is a row-by-row format, so I would do something like:
> 
> 1) Search for a row with one white pixel
> 2) Check that the following row *also* has one white pixel in the 
> same column
> 3) Check that the following row has three pixels in a row white -- 
> and the middle is in the column from #1 and #2
> 4) Check for two more rows with one white pixel in the proper column
> 5) The center of the plus sign is the middle white pixel from #3
> 
> If you aren't familiar with manipulating imageData, there are a fair 
> number of examples in the list archives. I believe Ken Ray also has a 
> nice tutorial up on his site. 

Here's the link if you didn't go there already:

http://www.sonsothunder.com/devres/revolution/tips/imag003.htm


Ken Ray
Sons of Thunder Software, Inc.
Email: kray at sonsothunder.com
Web Site: http://www.sonsothunder.com/



More information about the use-livecode mailing list