Saturday, March 26, 2016

Flowers!

Polishing up an instructable on assembling a SoilCam means burying another scanner! In the process I realize I've had a 4 Port Plugable USB hub running for over a year outside, through a Michigan winter. Neat : )

This burial is in a tub that a year ago we used to grow potatoes. While still located outside, having it in a tub makes it easier to have inside which resolves having to worry about how you're going to get power outside. Though if portability is required, a five gallon bucket would be a better option (soil is heavy!) and would still fit the scanner.

Thursday, July 23, 2015

Millipede Mating

I think this brings things full circle. Two weeks ago there was a barrage of baby pill bugs, last week we saw death occur as a hungry beetle larvae happened upon a slug, and this week we have millipede mating!


What we can see occurs over a period of 6 hours, and at some point it looks like three millipedes are involved. It's difficult to tell if they are the same millipedes participating throughout the entirety.

I had originally incorrectly titled this post "Centipede Mating". You can see between 16:02:01 and 16:57:02 that each body segment has two pairs of legs. If these were Centipedes you would only see one pair per segment. Assuming these are mating Millipedes we might get to see a slew of babies in a few weeks! Apparently they start off with only three pairs of legs and only after a few molting sessions do they appear as we're used to seeing them.

Amazing piece of info: Millipedes are part of the Myriapod family (many feet), and were the first oxygen breathing animal to walk on land! And last, these creatures are a significant contributor to decomposition, that crazy process that results in this wonderful pile of material we call soil that keeps you and I fed. Next time you're eating anything or simply going somewhere on a walk, thank the Millipedes.

 - https://en.wikipedia.org/wiki/Pneumodesmus
 - https://en.wikipedia.org/wiki/Myriapoda
 - http://www.biokids.umich.edu/critters/Myriapoda/

Image stabilization issues
Some of the videos I compile tend to shake left and right, a result of the scanner occasionally starting at a slightly different position. It always scans the same distance and looking at one image next to another it's difficult to see any difference. Play them back in a video and it becomes very apparent that the images don't line up.

I've used FFMPEG's deshake option to smooth out this jitter, but it's difficult to remove all of it. Going through each image one at a time is a bit too time consuming, so we need to either resolve the initial problem that causes it, or figure out a more accurate work around.

A few thoughts on resolving / working around this:
1. Figure out how the scanner returns home.
 - At 600 DPI even a millimeter off will result in a 20pixel shift. When viewing the whole 8.5x11" area it's not very obvious, when zooming into a smaller area it is. The intended use of these scanners from the manufacturer likely did not include building timelapse videos : )

2. Can we compare the first twenty rows of pixels from left to right of sequential images?
 - Once we find a certain percentage match, trim all rows to the left off.

3. Apply a ~5mm solid white border to the glass scanning plate
 - Use imagemagick to locate the border and crop within the boundary.

Saturday, July 18, 2015

Death of a Slug

A week ago a dying worm slowly crawled into a small pocket of space. I was interested at the possibility of seeing what the decomposition process would look like. A few days in and this happens:

I didn't expect to see something so violent! The timelapse videos shows in 10 seconds what in reality took nearly 12 hours. Maybe the speed at which it plays back is what makes it feel so violent? 

It would be great to develop a system that allows for real time viewing, but that will have to wait.

Not sure what type of slug was eaten, the predator in this case appears to be some sort of Beetle Larvae? You can also make out the worm in the first few seconds of video, the view of which is quickly obscured as the Beetle Larvae makes its way in.


Friday, July 10, 2015

Young Pillbugs

A few days ago a couple small explosions of tiny white bugs appeared. Zooming in shows what appear to be hundreds of tiny Pillbugs (Armadillidium vulgare, roly-polies : )! Action begins approximately 9 seconds in.

According to this article these young crustaceans have already spent 10 to 14 weeks riding around in the pouch of a female Pillbug. I wonder if we could look back at previous video and identify any of them?

The area represented in the video is approximately ~8.1cm x 4.5cm (3.2" x 1.8"). This puts the young Pillbugs at ~1.5mm (1/16") in length.

Most of the Pillbugs quickly disperse beyond the viewable area within a few seconds. A few slow down and some can be seen feeding, or being fed on.

So much happening in such little space, so much more happening that's barely visible, and I can only begin to imagine how much is going on that isn't visible at all at this level.

Sunday, June 28, 2015

Youtube Playlists, Current Image, Zoomed Views

Weekly videos are now being posted to this playlist on youtube.

Talking with George Albercook and Greg Austic got me wondering (in very rough) terms how the natively captured scanned images compare with a camera.

Scan DPI: 600
Physical Area: ~11.7x8.5"
Pixels:7015x5076

Equivalent to a 35 megapixel camera. Pew pew megapixels! Unfortunately, the videos being posted are processed down to ~1920x1080.

It would be interesting to see the timelapse at 4k on an appropriate monitor, but it's more interesting to start looking closer.  Since we're capturing the images at a higher res than being displayed, we can crop out a 1920x1080 section of the native res image and turn that into a video. Here's what that looks like over the course of a week:


The video above is of a ~3.2" x 1.8" splice of the earth. One week = 604800 seconds. This plays back in ~66 seconds. Life at ~9163x!

The scanner being used can capture images at 2400 DPI, and scanners that can capture at 9600 DPI aren't terribly expensive (though they do get bulkier). Capturing a full image at that res is probably too much for the Raspberry Pi to handle, and the storage space would be excrutiating. 

But capturing even a square inch of space at that DPI would be fascinating, and I think doable : ) 

For now, I wonder what square inch would be most interesting to capture at 2400DPI?

Also, latest images are being posted at the "Latest Image" tab above. Approximately ~10 minute delay.

Tuesday, June 16, 2015

Rain - Underground

Rain in Ann Arbor!



Ann Arbor saw between 1 and 3 inches of rain on Sunday, June 14th. It's interesting to see what the rain does to freshly (~two week) turned soil.

Playing around with imagemagick a bit more. I'm splicing a 100x100px section and getting the 'average brightness' of it. Scans are taken every 5 minutes, but to keep things simple I'm only sampling every third image, or roughly every 15 minutes.

Then I repeat that process 100px down, continuing until we get to the bottom of the image. Imagemagick spits out a pile of numbers like so:
Reading DateRainfall (in.)0-100100-200200-300300-400400-500500-600600-700700-800800-900
0:00:0009598.3313316.910462.310667.810865.210513.710696.410353.210342.7
0:15:0009460.7113131.910450.910675.110881.210513.110743.110371.110354.6
0:30:0009237.3912896.310400.810698.710877.810542.110744.610392.110368.6
0:45:0009155.2312850.51031510650.410851.810505.710729.310370.210382.1
1:00:0009487.3212982.910343.610668.1108471051210734.310374.610384
1:15:0009519.4312857.810288.210630.310810.610464.210685.210365.910339.7
1:30:0009623.3412937.310331.210609.410802.610485.510736.810393.210421.1
1:45:0009516.3912664.110087.510552.410765.210437.910715.710369.710345.9
2:00:0009497.9712638.110084.910480.210656.910417.910720.810366.610347.4
2:15:0009586.5812693.710088.410481.710597.610347.910712.910380.310333.1
2:30:0009770.5712844.19968.4610395.310489.610198.710651.910324.410265.1
2:45:0009660.312739.610046.810414.710511.41018810619.810355.510314.7
3:00:0009605.2812698.810024.210384.210493.6101821059410318.910277.6
3:15:0009569.2212469.810023.210386.910474.110120.610551.810289.610249.6
3:30:0009575.4412534.910039.61040910488.710132.110541.71027910242.2
3:45:0009509.712525.610005.710370.410443.810094.810502.810236.610190.7
4:00:0009598.0712539.19968.5510371.210460.410099.110510.910232.110183.5

Reading Date and Rainfall (in.) are coming from elsewhere. The first 100px is mostly black, this part of the scanner is above ground and since it's night there is little for the scanner's light to reflect off. A graph of the 400-500px region from 00:00 to 4:00:00 looks like:

The numbers above unfortunately represent the day prior to the rainfall. Whoops. In the morning I'll have numbers for the proper day and be able to compare them with data from the City of Ann Arbor's Rain Gauges. Some time later this week I'll post the results.

I'm wondering if I can show to some degree of reliability how far and how quickly the rain is penetrating into the soil with this setup. I guess I should build/buy some soil sensors at this point to compare : )

Also, currently using Imagemagick's identify -format '%[mean]' command to infer "image brightness", but I'm really not sure what the command is doing / how it comes up with the numbers it spits out....

So much to learn!

Updated: 
Comparison of rainfall vs. image brightness for June 14th. This is a 100px snapshot ~4 inches below the surface. Both the rainfall and image brightness values were remapped from 0 - 100.


I'm doing a couple things here that I'm pretty sure are bad ideas.
1. I'm analyzing the jpeg, not the original tiff file.
2. I'm analyzing a section of a copy of the original jpeg, more loss : )
3. I have no real clue what I'm doing with the math. I think I used the same method I used to remap and constrain light sensor values on an arduino project from years ago for this (return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;)...
4. Wheeeee!

Thursday, June 11, 2015

Imagemagick

Imagemagick is a wonderful suite of tools that allow people to do lots of interesting things with images. Combining it with very minimal scripting knowledge lets one easily automate processing of large batches of images.

I used ImageMagick's compare tool to highlight in red the difference between 286 sequential images captured over 24 hours. I then used IM's convert tool to remove all other colors, create a transparent background, and finally stack each image onto the next.

Avconv was then used to turn these into a short 10 second video.

It's not terribly clear, but it does highlight the path(s) worms are taking. The large blob of red that shows up at the top is sunlight penetrating the first inch or two of topsoil/debris.

Very little attention to any sort of detail has been taken with this. This was a terribly fun distraction from documenting the actual setup - which I should really finish up in the next week or two : ) Regardless, I am constantly amazed at the amount of blood sweat and tears that are freely available in the software world.