LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

imaq getpixelline error

I have this problem with imaq getpixelline.
 
I have a circle oblect in an image that i need to measure the intensity in a specific angle.
The line length is about 300pixels. if i measure the line length on an angle <5degrees above the horizontal axis, then i get a result of 241 pixels!!!!!!!!
This results to wrong measurement of the intensity values :(:(:(:(
 
Any ideas?
0 Kudos
Message 1 of 5
(2,892 Views)

Hi BillyP,

A couple of questions, what values do you have for the Line Coordinates input to IMAQ Get Pixel Line? Also how do you know how long the line is -- I'm assuming your are getting this from your Line Coordinates? It sounds like you are not reading all the pixels but, of the pixels you do read are the intensity values correct?

--Michelle

National Instruments
0 Kudos
Message 2 of 5
(2,856 Views)

Dear Michelle,

thank you for your answer.

Currently i am using the IMAQ Light meter(line). I am trasnlating the (r,θ) values to (x,y) and i am using this as an input. try to test the subrutine with values (0,340, 300, 335) and see what happens. the line should be about 300pixels but it turns to be only 241! This problem starts from IMAQ GetPixelLine. I checked it and this is causing the problem.

 I have found a way to solve my problem by using the IMAQ GetPointsOnLine, that with the same input it returns correct results. I mean the correct pixel count (300). I havent tested the intensity profiles yet and see if they are in correct line but i will do that now.

Let me know what you have found!

Thank you again 🙂

Vassilis

0 Kudos
Message 3 of 5
(2,845 Views)

Dear Michelle,

I have found the error! The image that i was working on was a 413,340 pixel image. The IMAQ GetPointsOnLine returned an error with the (0,340,300,335) line cause of the (0,339) vertical resolution of the image! So i checked on the IMAQ Light Meter (Line) and it works just fine now. The problem is that the pixels that were not in an image (the ones at (x,340) were substracted from the final result, without an error from the subrutine!

Maybe there should be an error indicator for these pixels.

 

Thank you again 🙂

 

Vassilis

0 Kudos
Message 4 of 5
(2,842 Views)
BillyP,
 
Glad to hear you cleared things up! Thank you for posting your results as it will serve as a solution for future customers.
 
Good luck for the rest of your application!
--Michelle

National Instruments
0 Kudos
Message 5 of 5
(2,825 Views)