Re: lingo-l GetPixel() to compare colors

2003-06-06 Thread James Newton
On Wednesday, June 4, 2003, at 01:53 PM, Rodrigo Peres wrote: I'm using getPixel to compare 2 images and return the differences between them. After I run a list of points and check if some points are diferent from the bgcolor (white). The problem: The image is scanned so there's a lot of dust

Re: lingo-l GetPixel() to compare colors

2003-06-06 Thread 2702NET
BTW, if you don't have James' book I highly recommend it. Plenty of nice imaging lingo stuff. Kerry's and Gretchen's reviews at Amazon say it all. http://www.amazon.com/exec/obidos/tg/detail/-/0072132655/104-9270019- 9338345?vi=glance Joe On Thursday, Jun 5, 2003, at 12:01 US/Eastern,

lingo-l GetPixel() to compare colors

2003-06-05 Thread Rodrigo Peres
Hi list, I'm using getPixel to compare 2 images and return the differences between them. After I run a list of points and check if some points are diferent from the bgcolor (white). The problem: The image is scanned so there's a lot of dust confusing the getPixel(). There's a way to compare if

Re: lingo-l GetPixel() to compare colors

2003-06-05 Thread Howdy-Tzi
On Wednesday, Jun 4, 2003, at 08:53 America/Chicago, Rodrigo Peres wrote: There's a way to compare if colors are greater than or darker than??? Try using color objects and palette index conversions: oColor = color(#rgb, 255,255,255) oColor2 = color(#rgb, 0,0,0) put oColor.paletteIndex

Re: lingo-l GetPixel() to compare colors

2003-06-05 Thread Carl West
Howdy-Tzi wrote: On Wednesday, Jun 4, 2003, at 08:53 America/Chicago, Rodrigo Peres wrote: There's a way to compare if colors are greater than or darker than??? Try using color objects and palette index conversions: oColor = color(#rgb, 255,255,255) oColor2 = color(#rgb, 0,0,0)

Re: lingo-l GetPixel() to compare colors

2003-06-05 Thread Cole Tierney
There's a way to compare if colors are greater than or darker than??? Try using color objects and palette index conversions: oColor = color(#rgb, 255,255,255) oColor2 = color(#rgb, 0,0,0) put oColor.paletteIndex oColor2.paletteIndex -- 0 put oColor.paletteIndex oColor2.paletteIndex -- 1

Re: lingo-l GetPixel() to compare colors

2003-06-05 Thread Colin Holgate
Here's a possibly good way to do it (I say possibly, because I didn't test it, but it feels like it ought to work). If you're using 8.5 or later, you could do this: c1 = rgb(100,100,100) c2 = rgb(123,100,100) v1 = vector(c1.red,c1.green,c1.blue) v2 = vector(c2.red,c2.green,c2.blue) put

Re: lingo-l GetPixel() to compare colors

2003-06-05 Thread Howdy-Tzi
On Wednesday, Jun 4, 2003, at 12:10 America/Chicago, Cole Tierney wrote: There's a way to compare if colors are greater than or darker than??? Try using color objects and palette index conversions: oColor = color(#rgb, 255,255,255) oColor2 = color(#rgb, 0,0,0) put oColor.paletteIndex

Re: lingo-l GetPixel() to compare colors

2003-06-05 Thread Colin Holgate
oColor = color(#rgb, 0,0,0) put oColor.hexstring() -- #00 oColor2 = color(#rgb, 255,255,255) put oColor2.hexString() -- #FF put oColor.hexString() oColor2.hexString() -- 0 put oColor.hexString() oColor2.hexString() -- 1 Don't know if you would want to work this way. A color of

Re: lingo-l GetPixel() to compare colors

2003-06-05 Thread Carl West
Colin Holgate wrote: Here's a possibly good way to do it (I say possibly, because I didn't test it, but it feels like it ought to work). If you're using 8.5 or later, you could do this: c1 = rgb(100,100,100) c2 = rgb(123,100,100) v1 = vector(c1.red,c1.green,c1.blue) v2 =

Re: lingo-l GetPixel() to compare colors

2003-06-05 Thread Cole Tierney
Here's a possibly good way to do it (I say possibly, because I didn't test it, but it feels like it ought to work). If you're using 8.5 or later, you could do this: c1 = rgb(100,100,100) c2 = rgb(123,100,100) v1 = vector(c1.red,c1.green,c1.blue) v2 = vector(c2.red,c2.green,c2.blue) put

Re: lingo-l GetPixel() to compare colors

2003-06-05 Thread Colin Holgate
Nice. This seems to make the most conceptual sense, since the rgb color model is described in terms of 3d space. Performance might be a problem, though. You could do your own Pythagoras out of the rgb values, and cut out the vector conversion. Not sure if that would be faster than the build

Re: lingo-l GetPixel() to compare colors

2003-06-05 Thread Howdy-Tzi
On Wednesday, Jun 4, 2003, at 13:36 America/Chicago, Colin Holgate wrote: Don't know if you would want to work this way. A color of rgb(0,255,255), full brightness cyan, may seem to be closer to black than rgb(1,0,0), almost completely black, would be. Sigh. It's jut not my day it seems.