temporalecologylab / TreeRings

Project developing methods and tools needed to collect tree ring dendrology data
2 stars 0 forks source link

Digital Scale Bar #28

Closed afong3 closed 2 months ago

afong3 commented 3 months ago

A very necessary step to calculating the physical distance between tree rings is having a scale bar to know the dimensions of each pixel in the image. While it has been normal for other systems to have a ruler or equivalent placed next to a core while imaging it, this is quite difficult with this system. While this does work well to show scale, it unnecessarily blocks a portion of the cookie.

My suggestion is to use the generated DPI (Dots Per Inch) metadata from the machine instead of a physical scale bar. To show that the DPI calculations from the machine are reasonably accurate, I have created a digital scale bar from the DPI value which is then overlaid onto a physical scale bar. The physical scale bar is made of a grid of 1mm x 1mm squares. Each resolution has a unique DPI metadata value which was used to create the scale bar.

Below are a few resolutions (which resulted in small enough files to display in this MD rendering). Although the same logic was used to create digital scale bars for every resolution successfully.

5 Percent Resolution: mosaic_5per_scale

10 Percent Resolution: mosaic_10per_scale

20 Percent Resolution: mosaic_20per_scale

lizzieinvancouver commented 3 months ago

@afong3 Okay, so just to confirm -- these are images with a little scale piece of paper plopped on the cookie? If so, then I think you have convinced me. You should just save some of these photos and your argument here for a supplement to a paper or such.

afong3 commented 3 months ago

Yup, that's exactly what it is. I've uploaded the code to GitHub and added a set of the stitched images to the Sync vault.

lizzieinvancouver commented 2 months ago

@afong3 Sounds like you've fixed this then. Nice work.