UBC Theses and Dissertations

UBC Theses Logo

UBC Theses and Dissertations

2D contour shape analysis for automated herring roe quality grading by computer vision Beatty, D. Andrew


A method has been developed to analyze the two-dimensional contour of naturally varying objects and to automatically assess the amount of shape variation that would be perceived by a person. Specifically, a software system was developed to assess the shape quality of herring roe sacs from a single overhead image. The shape difference from first grade to lower grade roe sacs calculated by the system matched well with that perceived by human roe graders, who select shape based on its appeal to the consumer. The principle motivation for this work is its application in the fishing industry, which requires both speed and robustness from the system, as well as grading accuracy. This software forms the basis of an actual industrial application, the prototype of which is currently under development. Objects in the image are segmented using brightness thresholding and by ensuring they do not not overlap. Morphological processing is used to filter out irrelevant shape features such as overlapping parasites and small broken pieces. The major principal axis of area serves as a reference axis for width measurements along the length of the shape. These measurements are the basis for deriving shape features. While this representation restricts the shapes to which the algorithm can be applied, it has worked well for roe sacs. Shape comparison involves taking the magnitude of the vector difference between the smoothed tangent angles at each measurement along the edges of each shape. This provides an effective measure of the human-perceived difference between the shapes, which can be used in combination with an internal database of acceptable shapes (either individuals or large data set clustering) to function as a shape assessment expert. In practice an internal database of 200 roe sacs has proven effective and sufficiently fast for comparison. A final shape difference measure is arrived at by averaging the 3 smallest shape comparison values obtained when comparing a sample with every database sample. In tests of sorting first from second grade roe sacs, the system has achieved overall accuracy of 81 ± 2 %. This compares with human grading accuracy, in which the entire three-dimensional shape of the sac is examined, of approximately 92%. The theoretical accuracy limit from two-dimensional contour information is estimated to be within a few per-cent of 85%. To be useful in practice, a grading approach is used in which only roe sacs which are determined to be first grade with high certainty are selected and the remainder are sorted by hand. Using this approach, the system can automatically select out half of a processor's bulk roe with a high (for the industry) accuracy of 97% for the selected sacs.

Item Media

Item Citations and Data


For non-commercial purposes only, such as research, private study and education. Additional conditions apply, see Terms of Use https://open.library.ubc.ca/terms_of_use.