Warning: JPEG library error: Invalid component ID 255 in SOS.
Error using jpeg_depth
JPEG library error: Invalid component ID 255 in SOS.
Error in readjpg (line 13)
depth = jpeg_depth(filename);
Error in imread (line 434)
[X, map] = feval(fmt_s.read, filename, extraArgs{:});
data points
I am interested in tracking the snow season of my favourite ski resort in the Alps, to help get a good idea of when are the best times to go. MATLAB Trendy is a good way of tracking this kind of information on a day by day basis. However, in order to achieve this I would like to be able to analyse webcam data to measure snow coverage.
Image data is obtained from http://www.snoweye.com/
| Time Recorded (time1822) | Data (data1822) |
|---|---|
| 27 Dec 2012 11:03:20 | |
| 26 Dec 2012 11:02:17 | [128.780296420027] |
| 25 Dec 2012 11:02:13 | [132.443027697045] |
| 24 Dec 2012 11:02:08 | [125.35837805287] |
| 23 Dec 2012 11:02:11 | [122.467438876867] |
%% Read in the website which does screen caps of webcams
a = urlread('http://www.snoweye.com/?page=fr-ch-portesdusoleil');
%% Find the image which corresponds to Avoriaz
[~, ~, ~, matches] = regexp(a, '/grabs/[0-9]+/[0-9]+\.jpg');
uniqueMatches = unique(matches);
urls = cellfun(...
@(x)['http://www.snoweye.com' x], ...
uniqueMatches, ...
'UniformOutput', false ...
);
%% Read that image
red = zeros(length(urls),1);
green = zeros(length(urls),1);
blue = zeros(length(urls),1);
for i = 1:length(urls)
myUrl = urls{i};
im = imread(myUrl);
red(i) = mean(mean(im(:,:,1)));
green(i) = mean(mean(im(:,:,2)));
blue(i) = mean(mean(im(:,:,3)));
end
redPredictor = mean(red);
bluePredictor = mean(blue);
greenPredictor = mean(green);
updatetrend(bluePredictor)
0 comments