Occultation of Saturn

by rb780nm on May 20, 2014

The other night, Saturn passed behind the Moon. it was visible from my deck, and the sky was clear, so I took a time lapse of it. It’s just with my DSLR and it’s strongest zoom lens, so these aren’t great pictures…

But I wanted to track the moon in this video – it’s time consuming and difficult to crop each frame individually keeping the moon stationary, but I wrote a script in Matlab using the built-in circle finder utility and made this video:

%track moon and crop

fid = fopen(‘file_list.txt’)
files = textscan(fid,’%s’)
files
files{1}
foo2 = files{1}
for j = 1:numel(foo2)
files{j} = foo2{j}
end
fclose(fid)

figure
hold on

for j = 1:97%numel(files)
rgb = imread(files{j});
[centers,radii] = imfindcircles(rgb,[255 280],’ObjectPolarity’,’bright’,’Sensitivity’,0.92,’EdgeThreshold’,0.1)

rgb2 = imcrop(rgb,[max(centers(1)-400,0),max(centers(2)-400,0),800,800]);

imwrite(rgb2,[‘crop_’,files{j}],’jpg’);
end

Previous post:

Next post: