Ask Your Question
0

how to get the real height (Z) from 2D image

asked 2020-06-05 07:14:31 -0600

updated 2020-06-05 09:48:09 -0600

supra56 gravatar image

Hello, I am new to image processing, and I'm working on creating topographic maps of 2D image depending on a grayscale of images using python. I convert the 2D RGB image to grayscale and each pixel has values from 0 to 255, then I draw the topographic map depending on the value of each pixel in the image which represents the height (Z) as shown in the photo below. but how to get the real height (Z) ?

image description

edit retag flag offensive close merge delete

Comments

1

255 is max, 128 is mean, and 0 is min. Since it's RGB, the max is a function of the decay of the speed of light and the shutter speed

kpachinger gravatar imagekpachinger ( 2020-06-05 09:20:32 -0600 )edit
1

to improve your question, please show:

  • example input data
  • your code
  • what you're trying to achieve (the image you show seems arbitrary)

and, how is this all related to opencv, a computer-vision library (it all seems more GIS related)

berak gravatar imageberak ( 2020-06-05 11:03:06 -0600 )edit
1

Is this about getting the real dimensions(like in cm) of an object in an image? If so - this sounds interesting and relevant.

holger gravatar imageholger ( 2020-06-05 14:20:56 -0600 )edit

yes , this is about getting the real dimensions

Yazan Alatoom gravatar imageYazan Alatoom ( 2020-06-11 03:04:28 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2020-06-15 05:59:35 -0600

kpachinger gravatar image

Without depth data, you would not have depth data.

You might yourself supply dummy values for the purpose of a fantasy environment or tutorial. But an RGB photo would not supply this information... unless it's a controlled environment. A Lego playset for example may have depth derived by color/position.

Generally, grayscale output varies widely depending upon the specific method or workflow.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2020-06-05 07:14:31 -0600

Seen: 1,341 times

Last updated: Jun 15 '20