Moon, Mars

Old habits die hard, so I pointed a raspberry pi (an old friend of mine, a model B+ from a few years back, still functioning like a charm) plus some compatible camera with a large field of view (fish eye like) to record. Record what? IDK, just make timelapses and something *will* come out of it.

So I captured the conjunction of the Moon and Mars with a very modest and toy-like MacGyverish, but at the same time very versatile setup. The Raspberry Pi board is „floating” in a drainage tube with tight fittings, with a camera front from a cheap mock camera for weather protection and an ND filter in front (the Sun has a tendency to burn its trail into the sensor, already visible on every image). Since I risked to move the camera, the ND filter stays on for the night which kinda sucks… I know.

I also created a max combination of all the recorded images, function finalPixel(x,y) = max(pixel(frame[0], x,y), pixel(frame[1], x, y) … pixel(frame[n], x, y)) where max compared values of luminance = (rgb24 >> 16) + ((rgb24 >> 8) % 256)*2 + (rgb24 % 256).

before moonrise

before moonrise

moonrise

moonrise

before marsrise

before marsrise

marsrise

marsrise

dawn

dawn

the camera: with bird poop

the camera: with bird poop

the nd filter, hoping the Sun won’t burn the sensor that quickly

the nd filter, hoping the Sun won’t burn the sensor that quickly

drainage pipe, duct tape, MacGyver would be proud

drainage pipe, duct tape, MacGyver would be proud

maxed image 1, gamma enhanced, Vega and somewhat Deneb also visible

maxed image 1, gamma enhanced, Vega and somewhat Deneb also visible

maxed image 2, gamma enhanced

maxed image 2, gamma enhanced

maxed image, original gamma

maxed image, original gamma

see the suntrail (from a past orientation)?

see the suntrail (from a past orientation)?

enhanced

enhanced

there: the sun left its trail on the sensor

there: the sun left its trail on the sensor

 

A sample EXIF from the raspberry image set

Filename – img00001.jpg
ImageWidth – 1600
ImageLength – 1200
Make – RaspberryPi
Model – RP_ov5647
XResolution – 72
YResolution – 72
ResolutionUnit – Inch
DateTime – 2018:06:30 20:03:34
YCbCrPositioning – Centered
ExifOffset – 192
ExposureTime – 6.0 seconds
FNumber – 2.90
ExposureProgram – Aperture priority
ISOSpeedRatings – 800
ExifVersion – 0220
DateTimeOriginal – 2018:06:30 20:03:34
DateTimeDigitized – 2018:06:30 20:03:34
ComponentsConfiguration – YCbCr
ShutterSpeedValue – 6 seconds
ApertureValue – F 2.90
BrightnessValue – 0.00
MaxApertureValue – F 2.90
MeteringMode – Center weighted average
Flash – Not fired
FocalLength – 3.60 mm
FlashPixVersion – 0100
ColorSpace – sRGB
ExifImageWidth – 1600
ExifImageHeight – 1200
InteroperabilityOffset – 870
ExposureMode – Auto
White Balance – Auto

Maker Note (Vendor): –

Thumbnail: –
ImageWidth – 64
ImageLength – 48
Compression – 6 (JPG)
XResolution – 72
YResolution – 72
ResolutionUnit – Inch
JpegIFOffset – 1006
JpegIFByteCount – 24576

 

And the php code I was too lazy to look up from my archive, so have rewritten it from memory.

set_time_limit(1600); 

class Maxer {
  public $masterFrame = false;
  function executeJob($pattern){
    $list = glob($pattern);
    $this->masterFrame = imagecreatefromstring(file_get_contents($list[0]));
    for ($q=1; $q<count($list); $q++){
      $this->processFile($list[$q]);
    }
    imagejpeg($this->masterFrame, 'output.jpg', 95);
    imagedestroy($this->masterFrame);
  }
  function processFile($filename){
    $i = imagecreatefromstring(file_get_contents($filename));
    $sx = imagesx($i);
    $sy = imagesy($i);
    for ($x = 0; $x<$sx; $x++){
      for ($y=0; $y<$sy; $y++){
        imagesetpixel($this->master, $x, $y, $this->maxPixel($this->masterFrame, $i, $x, $y));
      }
    }
    imagedestroy($i);
  }
  function lumi($col){
    return ($col % 256) + (($col >> 8) % 256)*2 + ($col >> 16);
  }
  function maxPixel($i1, $i2, $x, $y){
    $p1 = imagecolorat($i1, $x, $y);
    $p2 = imagecolorat($i2, $x, $y);
    if ($this->lumi($p1) > $this->lumi($p2)){
      return $p1;
    };
    return $p2;
  }
}

$maxer = new Maxer();
$maxer->executeJob('i*.jpg');
Facebooktwitterredditpinterestlinkedinmail