阿掖山
阿掖山

智力活动是一种生活态度 https://mountaye.github.io/blog/

.ijm | Dimension David with ImageJ

I watched Nutshell two days ago, and the headline was "Is Tintin of Ancient Sculpture Really So Small (Like David)? ”, in order to make an argument, the author measured the length of the penis of the David statue according to the picture. Although it is not very accurate, there is a quantitative result-“less than 4 centimeters”, and the tool used-ImageJ is also given.

How did you do it, let's try it too?

## What is `ImageJ`?

In the previous article ( "Are you straight out of the original image?" ), we mentioned that professional cameras can record pictures in RAW format. Such pictures contain more information than usual pictures, and also require special software for processing. Not only consumer-level cameras, but also microscopes and CT machines in the laboratory can be regarded as special cameras, and the images they produce naturally require professional software to read and process.

ImageJ is one such software. Compared with directly using programming languages (such as MATLAB, python's scikit-image module), the box, polygon, and ellipse selection tools it provides are much more troublesome to replace directly with programming languages; and the results of various operations can be Almost real-time feedback on the screen, no need to `imshow()` over and over again.

ImageJ is written in Java, so it behaves consistently across platforms (the user interface has a strong Windows 95 flavor, and on MacOS, too, Windows users gloat) . The code is open source on GitHub, free, allowing users to know what each of their operations is doing, and they can develop and expand their own functions and package them into third-party distributions. The Fiji we are going to use today is an ImageJ distribution that integrates many common extensions.

## How much?

The steps are briefly listed first, and the details are described later:

  • Download the frontal photo of the Statue of David.
  • Run `ImageJ` to open the image.
  • Duplicate the image, preventing our operations from altering the original data.
  • Use the rectangular selection box to select the area of the David from head to toe, and record the height of the selection box.
  • Use the `Analyze -> Set Scale` tool to determine the conversion between pixels and centimeters.
  • Draw the distance you want to measure with the line tool, read the length from the main panel.
  • Use `Analyze -> Tools -> Scale Bar...` to draw scale bars.

If you can figure out how to do it after seeing such a brief introduction, then you can (close this article) skip the detailed introduction below.

The photos we use are from Wikipedia's Chinese entry for "Statue of David" by Jörg Bittner Unna, shared under the CC-BY-3.0 license. We download a medium size (480×720) image:

Right-click on any point in the painting, select `Duplicate` in the pop-up menu, and select OK in the dialog box, so that we get a copy of the original image. All subsequent operations are performed on this copy, so that even if there is any operational error, irreversible damage to the copy will not affect our original data. If the security and integrity of the data cannot be guaranteed, the unintentional mistakes are called academic errors, and the intentional ones are called academic falsification.

Select the rectangle selection box in the toolbar (the shadow button on the left of the main panel in the figure), draw a rectangle in the figure, the upper and lower sides are the top and bottom of the statue of David respectively. After drawing, do not move the mouse , and then click The bottom of the main panel reads out the height `h=595`, here in pixels:

Click the `Analyze` button on the main panel, find `Set Scale` in the drop-down menu, in the pop-up dialog box, fill in the 595 pixels we read out for `Distance in pixels`, `Known distance` and `Unit of length` Fill in the 150 cm assumed by the author:

Then the formal measurement can begin. Use the rectangle selection tool again, and don't move the mouse after drawing. The `length=20.93` at the bottom of the main panel is the distance in cm:

Tintin can select the straight line tool (the fifth from the left), and use the mouse to drag and drop to draw the line, and the result will be displayed at the bottom of the main panel.

After measuring, to make it easier for others, you can draw a scale on the map. Click the `Analyze` button on the main panel again, find `Tools` in the drop-down menu, then find `Set Scale`, select the appropriate option in the pop-up dialog box, and then click OK, you can add a scale to the screen:

If you are satisfied with the operation, you can save the picture. (I was not satisfied with the result, so I just quit without saving.) The original image has not been changed and can be closed directly, and the software should not issue an objection (notice) dialog box.

## Measure how many?

Our screenshot shows that according to the height of 150 cm, the corresponding length of David's head is 20.92 cm.

For Tintin, because the shaded part in the picture has a great influence on the identification of the starting and ending points, the results of several measurements are different, the minimum value is 3.91 cm, and the maximum value is 4.45 cm.

## Is this amount right?

Our results are somewhat different from the original, but in the same order of magnitude (nonsense) . Since the original text does not introduce the data sources used by itself, the pictures in the original text are not suitable for measuring this data (discussed below), and they also add occlusions to key areas, so we cannot compare the difference between the two results.

For our own measurements, we can discuss several sources of error as follows:

  • camera parallax
  • depth error
  • Assumptions about David's height

### Camera Parallax

The camera we learned in geometric optics forms an inverted real image. The relationship between the object height and the image height depends on the knowledge of the object distance, the image distance, the focal length of the lens, etc. according to Newton's formula, and the "paraxial condition" is used. this assumption. In other words, all considered are ideal states. To meet this ideal state, it is basically equivalent to requiring the lens to have an infinite diameter, an infinite thickness, and an arbitrary focal length.

Our camera obviously does not satisfy this ideal state (simply prove that ideally the David and the wall behind it obviously cannot be imaged strictly in the same plane by the same lens group at the same time). Within the depth of field, objects of different depths can be imaged in the picture, but there is a perspective relationship. Objects of the same length, at different depths, have different image lengths on the picture; the length in the center of the picture is also different from that at the edge of the picture. When the photographers in station B took pictures of young ladies, their faces were as close to the middle of the picture as possible, and their legs generally appeared at the edge of the picture, which was to use the perspective effect of the wide-angle lens.

Our photos were taken visually with a medium-telephoto lens, and the perspective distortion is not very obvious, but we still encountered difficulties when measuring the height of the statue. We used the distance from the toes to the top of the head. If we take the middle of the feet, the result will be shorter.

### depth error

Our photos are two-dimensional, so the previous measurements are equivalent to assuming that the measured distance starts and ends at the same depth. If there is a depth difference between two points, the measurement line, depth difference, and actual distance will form a right triangle, and the actual distance needs to be calculated according to the Pythagorean Theorem. We don't get the depth difference here, so this error becomes a systematic error, and it is biased, and the real result is not less than the measured value.

The photo we selected looks at almost the entire statue, especially the parts we are more concerned about, so the depth difference is almost negligible; the image provided by Nutshell is looking up, so if this is the photo used for the measurement, the error should be more than ours. big. Of course, this comparison is meaningless because the author has not published the data and methods, and the pictures in the original text have mosaics.

### Assumptions about David's height

The screenshot at the beginning of the article has already given the reason for setting the height corresponding to the David statue to 150 cm. Let's take a look. Is this reason valid?

The text says "this is equivalent to the average height of a modern 12-year-old boy", but was Michelangelo really based on a 12-year-old human body? Why did we measure the height of David's head? It's for head-to-body comparison. The head-to-body ratio of David is 1:7.5, which is almost the proportion of an adult. In order to highlight some characteristics and temperament of the object, some characteristics do not conform to the setting of the prototype, which is completely possible and acceptable in art. The embroidered images in the book "A Dream of Red Mansions" and the costumes of actors in later TV series are almost all more mature than the age setting of the original book.

For example, the size of an organ should be measured by a ratio relative to a certain benchmark (such as body length), which is a dimensionless quantity. A measure with a dimension of length such as 4 centimeters, although it is indeed easier to have an intuitive feeling than a ratio, but the conclusion is easily shaken by doubts about height.

Finally, I think the most deadly problem is that the statue of David is actually a work of the Renaissance. Like the works of art imitating Greece in Rome, it is a product of other civilizations imitating Greece, and a lot of modern humanities are integrated into the process of imitation. spirit of ism. This theme also does not come from Greek culture. David's killing of Goliath is a story in Judeo-Christian culture. In this case, the author should additionally argue that the Renaissance description of Tintin copied the customs of Greek culture. That being the case, why not just look for an ancient Greek work from the ancient Greek period?

And the original text contains the words "You may say that the statue of David may be just an example, what if it is just Michelangelo's bad taste? An example cannot explain that the little Tintins in ancient Greek sculptures are very small", sorry, Michelangelo's work is not "an example" of ancient Greek sculpture.

## after class homework

The picture above is the French painter Jacques-Louis David's work "Napoleon Crossing the St. Bernard Pass in the Alps". Please complete the following topics according to the work:

  1. Find information to estimate the body length of a horse, and use this to estimate Napoleon's height.
  2. Find historical data on Napoleon's height and estimate the horse's body length accordingly.
  3. Compare the results of the first two questions.

What? You say Napoleon was riding a donkey? Oh, that's fine.

CC BY-NC-ND 2.0

Like my work?
Don't forget to support or like, so I know you are with me..

Loading...
Loading...

Comment