How to convert pixcel value to km....(image processing)

hi
how to convert pixcel value to km…(for image processing - boundary extraction) i got the result in xy pixcel value.

For example
Input from terminal

Starting x and y value is (102, 38)
End X and Y value is (1021, 417)
(with this 2 input i am got the pixcel lenth)

The X and Y value is (9km, 0.235km)

how to find the value in the form of KM…

ouput is like this
CurrentXY( 102, 503)
CurrentXY( 102, 504)
CurrentXY( 102, 505)
CurrentXY( 102, 506)
CurrentXY( 102, 507)
CurrentXY( 102, 508)
i need o/p format like this
10.0647 0.0573 1
10.0647 0.0566 1
10.6409 0.0566 1
10.6409 0.0559 1
11.9732 0.0559 1
11.9732 0.0551 1
12.5134 0.0551 1

just look at the image…

Your question seems strange for me. Do you want to know how many pixels do you need in a direction to represent 1 kilometer ?

This looks simple mathematics.
For each dimension (x and y), you know the represented distance D (in km), and you know what is the length lp of your window or max axis size (800 or 600…).
So one pixel in that dimension represents D/lp km.

Am I wrong ? Am I missing something from you ?

“What he said”.

Presumably the graph is linear.
Xkm = (Xpixels-leftedge) * (width in km) /(width in pixels)
same for Y

I think the complication is that there may be “islands” (like the kankar & silt deposit on the right). So if you’re interested in a specific boundary (e.g. clay&kankar/kankar&silt boundary), you can get multiple results.

BTW: did you check your old post on the subject?
( http://www.opengl.org/discussion_boards/cgi_directory/ultimatebb.cgi?ubb=get_topic;f=4;t=001382 )

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.