Inside Collection (Course): ECE 301 Projects Fall 2003
Summary: This test determines whether a fish is a salmon or a trout based on the relative intensities of the red component versus the blue and green components
This test relys on the fact that salmon get extremely red when they are swimming upstream to spawn. Sockeye salmon, which we were 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 bright red 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 test simply looks at the energy in each matrix and compares them. The important thing to test for is whether the red matrix energy is significatnly larger than the blue matrix or the green matrix.
| Intensity testing Image |
|---|
![]() |
% Check to see how much intensity there is in each of the color spectrums
for i = 1:3
fishnorm(:,:,i) = fishimage(:,:,i)./norm((fishimage(:,:,i)));
intensitymatrix(:,:,i) = reshape(fishimage(:,:,i), 1, prod(size(fishimage(:,:,1))));
intensity(:,:,i) = mean(intensitymatrix(:,:,i));
end
rgintens = intensity(:,:,1)-intensity(:,:,2);
rbintens = intensity(:,:,1)-intensity(:,:,3);
"assafdf"