LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

IMAQ GetPixelValue - "You specified a point that lies outside the image."

Solved!
Go to solution

Hi,

 

I'm trying to implement Floyd-Steinberg dithering on a jpeg image. I'm using the IMAQ GetPixelValue VI to obtain the pixel value from coordinates that are passed into the VI. I'm starting at 2,2 but each time I try to run my VI I get the error message "You specified a point that lies outside the image."

 

Can anyone point me to what I'm doing wrong?

 

Thanks.

 

Code attached (I'm using LV2010 v10)

 

Aidan85_0-1587337406799.png

 

0 Kudos
Message 1 of 4
(2,432 Views)

Can you also provide a sample image that produces the error you see?  I'm curious when and how the error manifests itself, would be an important clue what is going wrong.

 

Bob Schor

0 Kudos
Message 2 of 4
(2,391 Views)
Solution
Accepted by Aidan85

Hi..

 

It seems I was being incredibly dense (for a number of reasons).. my code was running but would scan past the last pixel without incrementing the y-axis, which was causing the error.. I was also adding unnecessary levels of complexity setting an ROI when I could read the pixel directly using the GetPixelValue.

 

Serves me right for doing LabVIEW at 2am!!

 

Aidan85_0-1587344932412.png

 

Message 3 of 4
(2,388 Views)

It's always a Good Sign when you find your own errors (goodness knows I've found a few real Klunkers that I've made ...).  Congratulations!

 

Bob Schor

0 Kudos
Message 4 of 4
(2,374 Views)