<< Chapter < Page | Chapter >> Page > |
This test relys on the fact that salmon get extremely red when they are swimming upstream to spawn. Sockeye salmon, which wewere specifically trying to detect are among the brightest of the salmon. The other fish we were trying to classify,steelhead trout, remain silver even during spawning season. This means that it is easy to distinguish between the brightred overall color of the salmon pictures and the relatively even color of the trout.
When Matlab takes in a picture, it stores it as three different matricies, one for each color, red, green, and blue. This testsimply looks at the energy in each matrix and compares them. The important thing to test for is whether the red matrix energy issignificatnly larger than the blue matrix or the green matrix.
% Check to see how much intensity there is in each of the color spectrums
for i = 1:3fishnorm(:,:,i) = fishimage(:,:,i)./norm((fishimage(:,:,i)));intensitymatrix(:,:,i) = reshape(fishimage(:,:,i), 1, prod(size(fishimage(:,:,1))));
intensity(:,:,i) = mean(intensitymatrix(:,:,i));endrgintens = intensity(:,:,1)-intensity(:,:,2);
rbintens = intensity(:,:,1)-intensity(:,:,3);
Notification Switch
Would you like to follow the 'Ece 301 projects fall 2003' conversation and receive update notifications?