<< Chapter < Page Chapter >> Page >
This test determines whether a fish is a salmon or a trout, or neither based on the length and width of the fish

One simple way to tell different fish apart is due to their ratio of length to width. For every species of fish, that ratiois essentially the same. On reason salmon are unique in that regard is because during spawning season, they grow wider andthus their length to width ratio becomes much smaller (approximately 2:1 or 3:1). Other fish, such as steelheadtrout, which maintain a much more sleek, approximately 3:1 to 4:1 length to width ratio even during spawning season.

This test is done using primarily the Canny Edge Detection method which is performed by Matlab using the command edge . It takes the image of the fish and finds an outline of it.

Canny edge detection image

The Fish image after the canny edge detection is run on it.

Canny edge detection

Image edges contain strong contrasts in intensity. The Canny Edge Detector tries to find only true edges by only selectinglocalized edge points and only responding once to a single real edge. The Canny method also filters noise with a convolutionmask built through Canny's algorithm. The edge detector then uses the gradient of the image and summing along the x directionand y direction to obtain the edge value. Direction of the edge is easily determined by looking at each directions value andseeing which one is larger. However, it is important to test for errors when one direction is zero, so Canny looks at the anglebetween the x-direction and y-direction. Canny also uses suppression to connect values along the direction of the edge.

After the edge detection has been run, the image is binary and all the edges are represented by ones. The rows and columns arethen each summed up. The algorithm then starts at each edge of the image and moves toward the center until it finds a row witha significant amount of values in it. This signals the edge of the fish closest to that side. Then, through simplecalculations, the length, width, and ration can be calculated.

Code for length/width test

% This function uses canny edge detection to try to find an outline of the % fish in the grayscale image and then it calculates the length to width% ratio of the fish. function [length,width,lwratio]= fishedge(image) imagegray = rgb2gray(image);imageedge = edge(imagegray,'canny'); l4rowedge = sum(imageedge);l4coledge = sum(imageedge')'; l4size = size(imageedge);j = 1; % Find the top edge of the fishwhile l4coledge(j)<4 top = j;j = j+1; endj = 1; % Find the bottom edge of the fishwhile l4coledge(l4size(1)-j+1)<4 bottom = l4size(1)-j+1;j = j+1; endwidth = bottom - top; j = 1;% Find the left edge of the fish while l4rowedge(j)<4 left = j;j = j+1; endj = 1; % Find the right edge of the fishwhile l4rowedge(l4size(2)-j+1)%lt; 4 right = l4size(2)-j+1;j = j+1; endlength = right - left; lwratio = length./width;
Got questions? Get instant answers now!

Questions & Answers

what is phylogeny
Odigie Reply
evolutionary history and relationship of an organism or group of organisms
AI-Robot
ok
Deng
what is biology
Hajah Reply
the study of living organisms and their interactions with one another and their environments
AI-Robot
what is biology
Victoria Reply
HOW CAN MAN ORGAN FUNCTION
Alfred Reply
the diagram of the digestive system
Assiatu Reply
allimentary cannel
Ogenrwot
How does twins formed
William Reply
They formed in two ways first when one sperm and one egg are splited by mitosis or two sperm and two eggs join together
Oluwatobi
what is genetics
Josephine Reply
Genetics is the study of heredity
Misack
how does twins formed?
Misack
What is manual
Hassan Reply
discuss biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles
Joseph Reply
what is biology
Yousuf Reply
the study of living organisms and their interactions with one another and their environment.
Wine
discuss the biological phenomenon and provide pieces of evidence to show that it was responsible for the formation of eukaryotic organelles in an essay form
Joseph Reply
what is the blood cells
Shaker Reply
list any five characteristics of the blood cells
Shaker
lack electricity and its more savely than electronic microscope because its naturally by using of light
Abdullahi Reply
advantage of electronic microscope is easily and clearly while disadvantage is dangerous because its electronic. advantage of light microscope is savely and naturally by sun while disadvantage is not easily,means its not sharp and not clear
Abdullahi
cell theory state that every organisms composed of one or more cell,cell is the basic unit of life
Abdullahi
is like gone fail us
DENG
cells is the basic structure and functions of all living things
Ramadan
What is classification
ISCONT Reply
is organisms that are similar into groups called tara
Yamosa
in what situation (s) would be the use of a scanning electron microscope be ideal and why?
Kenna Reply
A scanning electron microscope (SEM) is ideal for situations requiring high-resolution imaging of surfaces. It is commonly used in materials science, biology, and geology to examine the topography and composition of samples at a nanoscale level. SEM is particularly useful for studying fine details,
Hilary
Got questions? Join the online conversation and get instant answers!
Jobilize.com Reply

Get Jobilize Job Search Mobile App in your pocket Now!

Get it on Google Play Download on the App Store Now




Source:  OpenStax, Ece 301 projects fall 2003. OpenStax CNX. Jan 22, 2004 Download for free at http://cnx.org/content/col10223/1.5
Google Play and the Google Play logo are trademarks of Google Inc.

Notification Switch

Would you like to follow the 'Ece 301 projects fall 2003' conversation and receive update notifications?

Ask