Detection of pork backfat thickness based on nearest neighbor clustering and improved Hough algorithm

Zhou Tong,Peng Yankun,Liu Yuanyuan
DOI: https://doi.org/10.3969/j.issn.1002-6819.2014.05.031
2014-01-01
Abstract:The backfat thickness of pig carcasses refers to the fat thickness between the sixth rib and seventh rib, and the fat thickness is uniform, and is the thickest in this position. Backfat thickness is one of the most important indexes to assess pork quality. However detection of backfat thickness in most of the pork slaughtering houses and enterprises depends on trainees using measuring tools or making judgments directly by eye in China. This manual detecting method demands not only great labor but also lacks objectivity and accuracy. Additionally, hand contact can cause great adulteration to the pig samples. The objective of this research was to investigate a method for detecting backfat thickness based on computer vision and image processing technologies. The pig carcass images were collected by a machine vision image acquisition system on the slaughter line. The system consisted of an image acquisition device, light, a single chip microcomputer, a detection control button, and a computer and image processing algorithm equipped into the self developed system software. A black background plate was placed behind the pig carcass in order to adapt to the complexity of the environment. When a half carcass reached the camera view, the operator pressed the control button to acquire images of the carcass. And these collected images were automatically stored in the computer for further image processing. The algorithm consisted of two parts:the detection of the backfat part and the location. Some methods such as image segmentation, feature point detection, and flood fill were adapted to extract the backfat part. The method of determining the measurement position was as follows. First, the region of interest (ROI) was obtained. In this step, the rib area was extracted from the pig carcass. Then the floating window was used to scan the whole ROI image. The size of the scanning window was 20×1 and the direction of scanning was from top to bottom in each line of image. The average gray values in each scanning widow were calculated to obtain the distribution of the average gray value in each column. The feature points of the ribs were extracted by the characteristics of the average gray level line on each column of the ROI image. Next, points on the sixth and seventh ribs were clustered based on a nearest neighbor clustering algorithm. The points of each column were averaged, and they became new feature points between the sixth and seventh ribs. The horizontal and vertical coordinates of the known point were the average of new feature points. At last, we extracted the measuring line based on Passing a Known Point Hough Transform (PKPHT). The slope between two points, which belonged to the same line, was calculated and the slope accumulator was voted. The peak of the slope accumulator corresponded to the slope of the line to detect. Backfat thickness can be measured accurately by mapping the line to the backfat part. The results showed that this method can nondestructively determine the measurement position and measure the backfat thickness of pig carcasses after validation on multiple samples. And this method is of great significance for the development of an automatic classification system.
What problem does this paper attempt to address?