Cloud separation from blue sky and circumsolar region

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
chumann
Posts: 5
Joined: 2012-03-18T17:18:00-07:00
Authentication code: 8675308

Cloud separation from blue sky and circumsolar region

Post by chumann »

Dear list,

I have a series of time-lapse, fisheye photographs of the sky that I would like to process such that I can isolate the clouds only. I've been using a red filter on the camera lens in order to accentuate the clouds from blues sky and have been using the following masking call to IM with moderate success (lens flare around the bright circumsolar region when the sun is not occluded by a cloud is problematic):
>convert sky_image.tif -fuzz 65% -fill black -opaque blue cloud.tif

The 'fuzz' factor needs to be changed according to the sky condition in each image which I'm having a hard time figuring out how to set automatically in a script for post-processing the images. Has anyone a better solution for masking clouds from blue sky and lens flare around the circumsolar area? Would there be a way to use edge detection first and then a masking filter?

Many thanks in advance.

Chris
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Cloud separation from blue sky and circumsolar region

Post by anthony »

Perhaps an example (or a few of them)?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
chumann
Posts: 5
Joined: 2012-03-18T17:18:00-07:00
Authentication code: 8675308

Re: Cloud separation from blue sky and circumsolar region

Post by chumann »

Hi Anthony, are there instructions on the forum for posting images. I'm not sure where I can upload the images in order to reference them between the "img" tags . Sorry, I should probably know this in this day and age.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Cloud separation from blue sky and circumsolar region

Post by anthony »

I myself use a 'public' folder on dropbox for forum images.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: Cloud separation from blue sky and circumsolar region

Post by anthony »

I'm going to start by throwing out some general suggestions.

First sun removal. threshold very high and use morphology to locate a circle.
Use a 'sun' template to remove/reduce the sun on the results.

After that mask out the 'sky area' to get rid of the extra unwanted parts and use thresholds to get the clouds areas.

You may like to average a log of sun-removed images together to get a 'vigennette adjustment' first. Also such an image will give you a better idea of good threshold levels.

However general light level of the image may also be usful. Especially as the camera seems to be 'auto-adjusting' for the light level. For that you can use some of the non-sky image to figure out general light levels for that time of day. The side of the 'printer' look like a good place to get a 'light levels' adjustment.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply