CN108765448B - Shrimp larvae counting analysis method based on improved TV-L1 model - Google Patents
Shrimp larvae counting analysis method based on improved TV-L1 model Download PDFInfo
- Publication number
- CN108765448B CN108765448B CN201810522933.5A CN201810522933A CN108765448B CN 108765448 B CN108765448 B CN 108765448B CN 201810522933 A CN201810522933 A CN 201810522933A CN 108765448 B CN108765448 B CN 108765448B
- Authority
- CN
- China
- Prior art keywords
- image
- shrimp
- illumination
- model
- avg
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000004458 analytical method Methods 0.000 title claims abstract description 9
- 241000143060 Americamysis bahia Species 0.000 title 1
- 241000238557 Decapoda Species 0.000 claims abstract description 108
- 238000000034 method Methods 0.000 claims abstract description 39
- 238000012545 processing Methods 0.000 claims abstract description 35
- 238000007781 pre-processing Methods 0.000 claims abstract description 12
- 238000004891 communication Methods 0.000 claims abstract description 8
- 238000005286 illumination Methods 0.000 claims description 69
- 238000010606 normalization Methods 0.000 claims description 22
- 230000008859 change Effects 0.000 claims description 15
- 230000008569 process Effects 0.000 claims description 13
- 230000000694 effects Effects 0.000 claims description 7
- 238000005516 engineering process Methods 0.000 claims description 6
- 238000001914 filtration Methods 0.000 claims description 6
- 230000009466 transformation Effects 0.000 claims description 6
- 230000007797 corrosion Effects 0.000 claims description 5
- 238000005260 corrosion Methods 0.000 claims description 5
- 238000005070 sampling Methods 0.000 claims description 4
- 230000005540 biological transmission Effects 0.000 claims description 3
- 239000000126 substance Substances 0.000 claims description 3
- 238000012163 sequencing technique Methods 0.000 claims description 2
- 238000001514 detection method Methods 0.000 abstract description 7
- 230000035699 permeability Effects 0.000 abstract description 2
- 206010025482 malaise Diseases 0.000 abstract 1
- 238000009499 grossing Methods 0.000 description 5
- 238000011160 research Methods 0.000 description 4
- 230000011218 segmentation Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 3
- 238000002474 experimental method Methods 0.000 description 3
- 238000002834 transmittance Methods 0.000 description 3
- 241000251468 Actinopterygii Species 0.000 description 2
- 241001465754 Metazoa Species 0.000 description 2
- 241000209094 Oryza Species 0.000 description 2
- 235000007164 Oryza sativa Nutrition 0.000 description 2
- 230000006870 function Effects 0.000 description 2
- 125000001475 halogen functional group Chemical group 0.000 description 2
- 210000003128 head Anatomy 0.000 description 2
- 238000003384 imaging method Methods 0.000 description 2
- 230000000877 morphologic effect Effects 0.000 description 2
- 244000052769 pathogen Species 0.000 description 2
- 230000001717 pathogenic effect Effects 0.000 description 2
- 235000009566 rice Nutrition 0.000 description 2
- 238000012360 testing method Methods 0.000 description 2
- XLYOFNOQVPJJNP-UHFFFAOYSA-N water Substances O XLYOFNOQVPJJNP-UHFFFAOYSA-N 0.000 description 2
- 238000012935 Averaging Methods 0.000 description 1
- 241000238553 Litopenaeus vannamei Species 0.000 description 1
- 230000001174 ascending effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 239000000919 ceramic Substances 0.000 description 1
- 239000013078 crystal Substances 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 238000003706 image smoothing Methods 0.000 description 1
- 239000012535 impurity Substances 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 238000000513 principal component analysis Methods 0.000 description 1
- 230000011514 reflex Effects 0.000 description 1
- 238000010187 selection method Methods 0.000 description 1
- 230000002123 temporal effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/10—Segmentation; Edge detection
- G06T7/187—Segmentation; Edge detection involving region growing; involving region merging; involving connected component labelling
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/70—Denoising; Smoothing
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/60—Analysis of geometric attributes
- G06T7/62—Analysis of geometric attributes of area, perimeter, diameter or volume
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/10—Image acquisition modality
- G06T2207/10004—Still image; Photographic image
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/30—Subject of image; Context of image processing
- G06T2207/30242—Counting objects in image
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Geometry (AREA)
- Image Analysis (AREA)
- Image Processing (AREA)
Abstract
The invention belongs to the technical field of image processing and application, and relates to a shrimp seed counting analysis method based on an improved TV-L1 model, aiming at the counting problem of shrimp seed images affected by light sickness in real life, the collected images are subjected to image preprocessing by adopting the improved TV-L1 model, a communication region of the preprocessed images is marked, the average area of the shrimp seeds after preprocessing is solved, the number of the shrimp seeds is determined according to the ratio of the marked communication region area to the average area in a set comparison region, the automatic detection of the number of the shrimp seeds which are adhered and affected by light is realized, the problems that the permeability of a shrimp body is strong, the shrimp body is easily affected by light, and a target is not easily separated from a background are solved, and the random noise of the images is removed; the method is simple, convenient to operate, capable of directly processing a single image, simple in parameter setting and accurate in counting.
Description
The technical field is as follows:
the invention belongs to the technical field of image processing and application, and relates to a prawn larva counting analysis method based on an improved TV-L1 model, which is used for accurately counting prawn larvae under the condition of constant illumination.
Background art:
with the continuous expansion of the shrimp larvae culture scale, the shrimp larvae need to be quantitatively counted in the processes of feeding, transporting, selling and the like. The traditional counting method mostly adopts sampling of cups, bowls, barrels and the like, and counting is carried out by a manual naked eye method, so that great errors, time and labor consumption are caused, and the prawn seedlings are damaged to a certain extent. Various shrimp fry photoelectric counters, fish and shrimp fry counters and the like developed in recent years are convenient, but are easily influenced by the size of a channel and the size of shrimp fries and are expensive. The machine vision technology is gradually applied to the field of animal automatic identification and counting at present due to the advantages of non-contact, high precision and quantifiability, such as Liushi crystal, Wangshuai, Chenjun and the like, and the sport shrimp fry identification method [ J ] based on improved principal component analysis and AdaBoost algorithm, the journal of agricultural engineering, 2017,33(1) 212-; some scholars also use machine vision technology to perform behavior detection and identification counting research on aquatic animals, such as documents Ma H, Tsai T F, Liu c.real-time monitoring of water quality using temporal objective of live fish [ M ]. megamon Press, inc.2010 and zhouyi, once standing wave, Liu yuntang, etc.. image processing-based automatic colony counting methods and their implementation [ J ] data acquisition and processing, 2003,18(4):460 and 464; the method for automatically detecting and counting rice blast pathogen spores based on microscopic image processing [ J ] in agricultural engineering report, 2015,31(12): 186) 193 provides an improved watershed algorithm based on distance transformation and Gaussian filtering to separate adhesion spores, meets the requirements for automatically detecting and counting the rice blast pathogen spores, is Zhouyeli and the like, provides an adhesion colony separated based on distance transformation and the watershed algorithm, and utilizes edge tracking to identify and count. The methods are mainly suitable for object identification and counting which are not influenced by illumination and are typical in characteristics. The prior research on shrimp larvae detection and counting reports that the index of refraction can be counted, and the research on shrimp larvae counting mainly has the following problems: the shrimp larvae have the characteristics of small size, strong light transmittance and the like, and are easily affected by illumination, so that the boundary information of the shrimp larvae is unclear; secondly, because the shrimp larvae are distributed at different water depths, and the light transmittance is strong, the problems of adhesion, different color depths and the like exist in the collected images, and the counting result error is larger by utilizing the existing method.
The invention content is as follows:
the invention aims to overcome the defects in the prior art, and provides a marking area counting analysis method for a shrimp seedling connected region with constant illumination based on an improved TV-L1 model aiming at the counting problem of shrimp seedling images affected by light halo in real life, so that the shrimp seedlings are accurately counted and analyzed under the condition of constant illumination.
In order to achieve the above object, the method for counting and analyzing young shrimps comprises the following steps:
acquiring an image: setting a camera in a viewing range, adjusting the position of the camera, adjusting a bracket to enable an image to be displayed correctly, selecting a proper camera scene mode according to actual conditions, setting the camera to be automatically adjusted in focal length and aperture, automatically performing white balance, sampling under different indoor illumination intensities, capturing and storing to obtain an observed image;
(II) image preprocessing: the specific process is as follows:
(2-1) establishing an improved TV-L1 model: when a large non-uniform illumination influence exists in an observation image, the content of the observation image is often covered in a darker area, the image enhancement technology based on logarithmic transformation can effectively enhance the image details of low-value gray scale, and the existing TV-L1 model is improved by utilizing a logarithmic mode, specifically:
carrying out logarithmic enhancement on the observation image f to obtain:
F=logf (1)
taking the F as an object to be researched,
wherein f is an observation image containing noise, u is a smooth image obtained after TV-L1 model processing,is an image gradient operator, lambda is a penalty parameter, and omega is the whole image area; solving the gradient descent equation to obtain Jacobi iteration, and obtaining the windward difference and the central difference by adopting the prior art:
wherein the content of the first and second substances,
Fi,jrepresenting the pixel value at (i, j) in the image,the pixel value of (i, j) is the position of the recovered image after the nth iteration, lambda is a penalty parameter, the similarity of u and F is controlled, the step length h is 1, the distance between adjacent pixel points in the image is represented, and epsilon is 10-7Preventing the denominator from being 0;
(2-2) image normalization processing: according to the characteristics that the shrimp larvae image has strong light transmission and the background and the target image are not easy to be segmented, the improved TV-L1 model is used as a low-pass filter operator to estimate the illumination component, a quotient image of an observation image in a logarithmic domain and a smooth image obtained after the improved TV-L1 model is defined as a result image of illumination normalization, and the method specifically comprises the following steps:
the illumination normalization method simulates an observed image F as the product of an illumination component l and a reflection component r, and by estimating the illumination component, the reflection component is obtained as the illumination independent quantity estimation,
F=r·l (8)
using the modified TV-L1 model as the low pass filter operator E, the illumination component estimate is obtained as
Representing the convolution of the signal, and then defining a Logarithmic Quotient Image (LQI) as
Define Quotient Image (QI) as
In the formula, u is a smooth image obtained after the TV-L1 model is processed; the effect of the illumination normalization of the quotient image comes from the assumptions: the low-frequency component with slow change in a large range in the image is a result influenced by illumination change, and the image obtained by filtering with a similar low-pass filtering operator can be regarded as an image reflecting the illumination change, so that the normalization of illumination is realized by performing pixel-by-pixel quotient operation on the smooth image, and the illumination invariant representation of the image is obtained;
(2-3) image morphology processing: firstly, a flat disc structural element with the radius of 4 is selected to carry out expansion processing on the image after illumination normalization processing, then a flat disc structural element with the radius of 9 is selected to carry out corrosion operation on the image, and the shrimp seeds which are adhered together are separated;
(2-4) image binarization: determining an optimal threshold value by using a maximum inter-class variance method disclosed in the documents Ostu N, Nobuyuki O, Otsu N.A threshold selection method from grade-level hierarchy IEEE Transactions on Systems [ J ]. IEEE Transactions on Systems Man & Cybernetics,1979,9(1):62-66, segmenting an image, and performing image binarization on the image obtained after the processing of the step (2-3) to obtain a preprocessed image;
(III) counting the shrimp larvae: firstly, marking a communication area of the preprocessed image, solving the average area of the preprocessed shrimp fries, and then determining the number of the shrimp fries according to the ratio of the marked communication area to the average area in a set comparison interval, wherein the specific process comprises the following steps: firstly, marking the connected regions by using a sequential marking method, calculating the number of the connected regions as a, then respectively calculating the areas of the connected regions, sequencing the connected regions from small to large, storing the connected regions into an array S, and assigning n1 to be 0 and n2 to be 0; then before statisticsThe area average value of each connected region is recorded as Avg; according to the pre-determinedThe average value Avg is calculated, the area of a communication area between 0.5Avg and 1.5Avg is calculated, the average value Avg is calculated again and is compared with the original average value, the Avg is updated continuously, the step is repeated until the average area Avg does not change, the average value Avg is calculated, and the element S [ i ] in the S is taken out in sequence](ii) a If S [ i ]]When the average value is less than 0.3Avg, the count is 0; if S [ i ]]If more than Avg, the number of shrimp larvaen1 ═ n1+ K, where round is the rounding function; if 0.3Avg is less than or equal to Si]If the content is less than or equal to Avg, n2 is n2+ 1; and when i is larger than a, N is N1+ N2, and shrimp fry counting is completed.
Compared with the prior art, the invention researches the shrimp larvae detection and counting method by using the image processing technology, realizes the automatic detection of the number of the shrimp larvae which are adhered and influenced by illumination, solves the problems that the shrimp bodies have strong permeability, are easily influenced by illumination and are not easy to separate targets from the background, and simultaneously removes the random noise of the image; the method is simple, convenient to operate, capable of directly processing a single image, simple in parameter setting and accurate in counting.
Description of the drawings:
FIG. 1 is a schematic block diagram of the workflow principles of the present invention.
Fig. 2 is a schematic diagram of a shrimp fry counting process according to the invention.
Fig. 3 is a schematic diagram of experimental equipment adopted in the embodiment of the present invention.
Fig. 4 shows shrimp larvae images acquired according to an embodiment of the present invention, wherein (a1) - (a4) are shrimp larvae images under dim light, (b1) - (b4) are shrimp larvae images under dim light, (c1) - (c4) are shrimp larvae images under darker light, and (d1) - (d4) are shrimp larvae images under bright light.
Fig. 5 shows the result of preprocessing the images according to the embodiment of the present invention, wherein (a) the result image after preprocessing the sparse shrimp pair LQI, (c) the result image after preprocessing the dense shrimp pair LQI, (b) the result image after preprocessing the sparse shrimp by histogram equalization, and (d) the result image after preprocessing the dense shrimp by histogram equalization.
Fig. 6 is a result of sorting the areas of the connected regions of the 16 shrimp fry images under different illumination in a line drawing from small to large respectively in the embodiment of the present invention, wherein the abscissa represents the number of the connected regions, and the ordinate represents the area of the connected regions; wherein (a) is the image of the shrimp larvae under dim yellow light, (b) is the image of the shrimp larvae under dim light, (c) is the image of the shrimp larvae under darker light, and (d) is the image of the shrimp larvae under bright light.
Fig. 7 is an average area of connected regions of the 16 images of the shrimp larvae under different illumination in fig. 4 according to the embodiment of the present invention.
The specific implementation mode is as follows:
the invention is further illustrated by the following examples in conjunction with the accompanying drawings.
Example (b):
in this embodiment, the shrimp larvae are used as the penaeus vannamei boone, the experimental facility is shown in fig. 1, and includes a notebook computer, a circular white ceramic bowl, a camera support, a single lens reflex camera and the like, and the experimental environment is as follows: MATLAB R2014B, processor: intel (R) core (TM) i5-4590 CPU @3.30GHZ 3.30GHZ, mounted memory (RAM): 4.00GB, the specific process of counting analysis of the prawn fry is as follows:
the first step is as follows: image acquisition, the specific image acquisition process is as follows:
(1) setting a camera in a viewing range, adjusting the position of the camera, and adjusting the bracket to correctly display the image;
(2) camera setting, selecting a proper camera scene mode;
(3) the camera is set to automatically adjust the focal length and the aperture, automatically perform white balance, and perform sampling under different indoor illumination intensities;
(4) the acquired shrimp fry image is shown in fig. 4 after being captured and stored, and the acquired shrimp fry image has the following characteristics as can be seen from fig. 4: (1) the image illumination of the shrimp larvae background is uneven, and the images are collected at different time and places, so that incident light with different angles is generated, the shrimp larvae image backgrounds are different, and the identification difficulty is increased; (2) due to the characteristics of strong self-structure and light transmission of the shrimp larvae, the imaging gray values of the head, the trunk and the tail of the shrimp larvae are different, especially the imaging of the trunk and the tail are approximately integrated with the background, and the difficulty of extracting characteristic points and removing the background is increased; (3) part of shrimp larvae are densely distributed and adhered, so that the difficulty in segmentation and counting is increased;
the second step is that: image pre-processing
3.1 illumination normalization
(1) TV-L1 model
The TV-L1 model is a classic model in the field of image restoration proposed by Chan T F, Eedeglolu S and the like, mainly solves the inverse processing problem of restoring an original image from an observed image, and is a regularization method aiming at saving image details while smoothing the image; chen et al propose an algorithm for image layering and background checking using the TV-L1 model, so that the image can be filtered using the TV-L1 model as a low pass operator to achieve an edge-preserving image smoothing effect:
wherein f is an observed image containing noise, u is a restored image,for the image gradient operator, λ is a penalty parameter. The first term on the right side of the equation is called a smoothing term, and the smoothing term has a smoothing effect on the image and can remove noise; the second term on the right side of the equation is a data item which represents the similarity degree of the restored image and the observed image;
from the gradient descent equation:
to obtain
After Jacobi iterative computation, the following results are obtained:
wherein the content of the first and second substances,
thus, the observation image f obtains a smooth image u after iterative convergence;
(2) improved TV-L1 model
When the image has large non-uniform illumination influence, the content of the image is often covered in a darker area, and the image detail of low-value gray scale can be effectively enhanced by the image enhancement technology based on logarithmic transformation, so the embodiment proposes to improve the TV-L1 model by means of taking logarithm.
For the observation image f, after logarithmic enhancement, the following results are obtained:
F=logf (20)
and F was used as the subject.
Solving by a gradient descent equation to obtain:
wherein c is1、c2、c3、c4Is shown in formula (16)(17) Formula (18) formula (19);
(3) illumination normalization
The illumination normalization algorithm of the image is to remove the influence of illumination from the non-uniform illumination image through image transformation to obtain the image without illumination change. Many illumination normalization algorithms have been proposed by researchers. Wang et al propose a quotient image model, which uses a quotient image of an observed image and a gaussian smooth image as an illumination normalization result, which can be applied to any single image, but gaussian smoothing cannot well maintain edge details in a low-frequency illumination field, and in this embodiment, according to the characteristics that a shrimp larva image has strong light transmittance and is not easy to segment a background and a target image, propose that an improved TV-L1 model is used as a low-pass filter operator to estimate an illumination component, and define a quotient image of an observed image in a logarithmic domain and a smooth image obtained by processing with the improved TV-L1 model as an illumination normalization result image:
generally speaking, the illumination normalization method simulates the observation image F as the product of the illumination component l and the reflection component r, and the illumination component is estimated to further obtain the reflection component as the illumination-independent quantity estimation, so that the embodiment has the advantages that
F=r·l (22)
Using the modified TV-L1 model as the low pass filter operator E, the illumination component estimate is obtained as
Denotes the convolution of the signal. Defining a Logarithmic Quotient Image (LQI) as
Define Quotient Image (QI) as
In the formula, u is a smooth image obtained after the TV-L1 model is processed, and the effect of illumination normalization of the quotient image comes from the assumption that: the low-frequency component with slow change in a large range in the image is a result of the influence of illumination change, and the image obtained by filtering with a similar low-pass filter operator can be regarded as an image reflecting the illumination change, so that the normalization of illumination is realized by performing pixel-by-pixel quotient operation on the smooth image, and the illumination invariant representation of the image is obtained.
The method has the advantages that a TV-L1 model is used as a low-pass filter operator to estimate the illumination change image in an image number domain, the halo phenomenon of the common low-pass operator acting on a high-frequency region can be eliminated, part of noise is removed, certain edge keeping characteristics are achieved, parameter setting is simple, only one parameter lambda is needed, a clear image can be obtained by adjusting lambda, the larger the value of lambda is, the greater the punishment on a data item is, the clearer the image is, and when the parameter lambda acts with a smooth item, the edge characteristics of the image can be better kept; in the actual test process, the histogram equalization in the prior art can only improve the contrast of the image in a limited way, the TV-L1 model is used as a low-pass filter operator to carry out self-quotient (quotient of the observed image and the smooth image) processing, although the illumination influence can be removed, partial noise exists, the logarithm of the image is taken to reduce the pixel difference between the gray values, namely, the low-value gray value is expanded to compress the high-value gray value, and then the self-quotient processing is carried out, so that the effect is obviously improved.
3.2 image morphology processing
The application of mathematical morphology can simplify image data, and remove incoherent structures while keeping the basic shape characteristics of the image data, and the embodiment finds that shrimp seeds have the problems of adhesion, edge burrs and the like after eliminating halation and partial impurity influence on the image, so that on the basis of the image subjected to light normalization processing, a flat disc structural element with the radius of 4 is selected to perform expansion processing on the image, and then a flat disc structural element with the radius of 9 is selected to perform corrosion operation on the image, so that the shrimp seeds adhered together are separated;
3.3 image binarization
In order to make the subsequent counting more accurate, the shrimp seeds with different gray-scale pixels are required to be countedThe most important problem in the binarization process is the threshold value selection problem, if a threshold value iteration mode is adopted, a more appropriate threshold value can be automatically obtained through a program, however, multiple experiments show that the threshold value iteration mode is simple, but the slight part of the image has no good discrimination, in some specific images, the change of fine data can cause great change of the segmentation effect, and in the test, the maximum inter-class variance method provided by the OTSU is found0The method is simple to operate, high in processing speed and good in detail processing of the image during segmentation, so that the method is adopted to determine the optimal threshold value and segment the image;
4 shrimp fry counting
Based on the existing image characteristics, the number of connected areas is directly read from the preprocessed image to serve as a final data result, obviously, higher accuracy rate is difficult to obtain, the shrimp seeds are different in size, some shrimp seeds are adhered, if the corrosion scale is too large, the small-area shrimp seeds can be eliminated, if the corrosion scale is too small, the adhered areas are difficult to separate, and in order to solve the problem that the characteristic areas of the shrimp seeds are different in size, the connected areas are marked firstly, the average area of the preprocessed shrimp seeds is obtained, and then the number of the shrimp seeds is determined according to the ratio of the marked connected area to the average area in the set comparison interval.
4.1 calculation of average area, the specific steps are as follows:
(1) using a connected region marking algorithm, adopting an 8-connected region traversal image, and solving the number of connected regions as a;
(2) arranging the connected regions in ascending order, only before countingThe area average of each connected region is recorded as Avg
(3) According to the previously calculated Avg, the area of a communication area between 0.5Avg and 1.5Avg is counted, the average value Avg is calculated again and compared with the original average value, the Avg is updated continuously, and the step is repeated until the average area Avg does not change any more;
4.2 handling strategy at count
When the shrimp larvae are counted, aiming at the connected areas with different sizes, the processing mode is as follows:
(1) during the morphological processing, the shrimp larvae eyes separate from the body, causing counting errors. When the area S of the connected region is less than 0.3Avg, the counting is not carried out;
(2) in the pretreatment, part of the shrimp fries are excessively corroded, and the part of the image with S being more than or equal to 0.3Avg and less than or equal to Avg is calculated according to one shrimp fry;
(3) the adhesion problem of the shrimp seedlings is solved, the area of a communication area generally meets the condition that Avg is less than S, and the number K of the shrimp seedlings is calculated according to the formula (26):
wherein K is an integer, Si is the area of the connected region, round is a rounding function;
4.3 counting procedure
The specific counting process of the shrimp larvae is as follows:
(1) marking the connected areas by using a sequential marking method, and calculating the number of the connected areas as a;
(2) respectively calculating the areas of the connected regions, sorting the connected regions from small to large, storing the connected regions into an array S, and assigning n1 to be 0 and n2 to be 0;
(3) averaging Avg according to the method for updating Avg in 4.1, and sequentially taking out the elements Si in S;
(4) if S [ i ]]When the average value is less than 0.3Avg, the count is 0; if S [ i ]]Greater than Avg, thenn1 ═ n1+ K; if 0.3Avg is less than or equal to Si]If the content is less than or equal to Avg, n2 is n2+ 1;
(5) and when i is larger than a, N is N1+ N2, the algorithm is ended, and the shrimp fry counting is completed.
5 results and analysis of the experiments
Fig. 5 shows the results of processing by applying the automatic shrimp larva counting method of this embodiment, where (a) and (c) are results images of LQI preprocessing of sparse shrimp pairs and dense shrimp pairs, and (b) and (d) are results images of histogram equalization preprocessing of sparse shrimp pairs and dense shrimp pairs, and it can be seen from the images that the experimental results are significantly affected by illumination, fig. 6 is a result obtained by sorting the areas of the connected regions of 16 shrimp larva images under different illumination in a broken line graph from small to large, where the abscissa represents the number of the connected regions and the ordinate represents the area of the connected regions; in this embodiment, a comparison experiment is performed between the result image after the LQI processing and the result image after the histogram equalization processing, the experimental sample is the counting result of 16 shrimp larvae images with different illumination, shapes and numbers shown in table 1,
TABLE 1 shrimp larvae count results
Wherein the relative error is formulated as
The average accuracy is calculated by the formula
The experimental results show that: in 16 tested images, the number of shrimp seeds in each image is 4-167, and the average accuracy rate of the shrimp seed detection after the LQI processing is 99.276 percent, which is 27.76 percent higher than the average rate of the shrimp seed detection after the histogram equalization processing; the results of the shrimp larvae after the LQI processing show that 11 images have no error, and the images are characterized in that the segmented images are refined into isolated outlines, so that the counting is not influenced; counting results of 3 images are 1 to 4 less than manual counting, and the images are characterized in that some shrimp seeds are distributed at edge parts, so that pixel points of the LQI preprocessed shrimp seeds are lighter than those of other shrimp seeds, and the shrimp seeds are easy to ignore in self-adaptive threshold segmentation; the counting results of other residual images are 2 more than that of manual counting, 32 young shrimps exist in (a1-a4) and (b1-b4) in fig. 4, but the automatic counting results are different, which shows that the experimental results are affected by illumination, young shrimp distribution, young shrimp adhesion degree and the like, and analysis shows that in the image acquisition process, due to shooting angles, the young shrimps are different in size and relatively larger in size, the head and the body are easily divided into two parts in the morphological process, and the two parts are the same in size, so that counting errors are easily caused.
Claims (1)
1. A shrimp fry counting analysis method based on an improved TV-L1 model is characterized by comprising the following steps:
acquiring an image: setting a camera in a viewing range, adjusting the position of the camera, adjusting a bracket to enable an image to be displayed correctly, selecting a proper camera scene mode according to actual conditions, setting the camera to be automatically adjusted in focal length and aperture, automatically performing white balance, sampling under different indoor illumination intensities, capturing and storing to obtain an observed image;
(II) image preprocessing: the specific process is as follows:
(2-1) establishing an improved TV-L1 model: when a large non-uniform illumination influence exists in an observation image, the content of the observation image is often covered in a darker area, the image enhancement technology based on logarithmic transformation can effectively enhance the image details of low-value gray scale, and the existing TV-L1 model is improved by utilizing a logarithmic mode, specifically:
carrying out logarithmic enhancement on the observation image F to obtain a logarithmically enhanced image F:
F=log f (1)
taking the F as an object to be researched,
in the formula, f is an observed image containing noise, u is a smooth image obtained after the TV-L1 model is processed, v is an image gradient operator, lambda is a penalty parameter, and omega is the whole image area; solving the gradient descent equation to obtain Jacobi iteration, and obtaining the windward difference and the central difference by adopting the prior art:
wherein the content of the first and second substances,
Fi,jrepresenting the pixel value at (i, j) in the image,the pixel value of (i, j) is the position of the recovered image after the nth iteration, lambda is a penalty parameter, the similarity of u and F is controlled, the step length h is 1, the distance between adjacent pixel points in the image is represented, and epsilon is 10-7Preventing the denominator from being 0;
(2-2) image normalization processing: according to the characteristics that the shrimp larvae image has strong light transmission and the background and the target image are not easy to be segmented, the improved TV-L1 model is used as a low-pass filter operator to estimate the illumination component, a quotient image of an observation image in a logarithmic domain and a smooth image obtained after the improved TV-L1 model is defined as a result image of illumination normalization, and the method specifically comprises the following steps:
the illumination normalization method simulates an observed image F as the product of an illumination component l and a reflection component r, and by estimating the illumination component, the reflection component is obtained as the illumination independent quantity estimation,
F=r·l (8)
using the modified TV-L1 model as the low pass filter operator E, the illumination component estimate is obtained as
Representing signal convolution, and then defining log quotient image LQI as
Define quotient image QI as
In the formula, u is a smooth image obtained after the TV-L1 model is processed; the effect of the illumination normalization of the quotient image comes from the assumptions: the low-frequency component with slow change in a large range in the image is a result influenced by illumination change, and the image obtained by filtering with a similar low-pass filtering operator can be regarded as an image reflecting the illumination change, so that the normalization of illumination is realized by performing pixel-by-pixel quotient operation on the smooth image, and the illumination invariant representation of the image is obtained;
(2-3) image morphology processing: firstly, a flat disc structural element with the radius of 4 is selected to carry out expansion processing on the image after illumination normalization processing, then a flat disc structural element with the radius of 9 is selected to carry out corrosion operation on the image, and the shrimp seeds which are adhered together are separated;
(2-4) image binarization: determining an optimal threshold value by adopting a maximum inter-class variance method, segmenting the image, and performing image binarization on the image processed in the step (2-3) to obtain a preprocessed image;
(III) counting the shrimp larvae: connecting the pre-processed imagesMarking the through areas, solving the average area of the pretreated shrimp seeds, and determining the number of the shrimp seeds according to the ratio of the marked through areas to the average area in the set comparison interval, wherein the specific process comprises the following steps: firstly, marking the connected regions by using a sequential marking method, calculating the number of the connected regions as a, then respectively calculating the areas of the connected regions, sequencing the connected regions from small to large, storing the connected regions into an array S, and assigning n1 to be 0 and n2 to be 0; then before statisticsThe area average value of each connected region is recorded as Avg; according to the previously obtained Avg, the area of a communication area between 0.5Avg and 1.5Avg is counted, the average value Avg is re-obtained and is compared with the original average value, the Avg is continuously updated, the step is repeated until the average area Avg is not changed any more, the average value Avg is obtained, and the elements S [ i ] in S are sequentially taken out](ii) a If S [ i ]]When the average value is less than 0.3Avg, the count is 0; if S [ i ]]If more than Avg, the number of shrimp larvaen1 ═ n1+ K, where round is the rounding function; if 0.3Avg is less than or equal to Si]If the content is less than or equal to Avg, n2 is n2+ 1; and when i is larger than a, N is N1+ N2, and shrimp fry counting is completed.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810522933.5A CN108765448B (en) | 2018-05-28 | 2018-05-28 | Shrimp larvae counting analysis method based on improved TV-L1 model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810522933.5A CN108765448B (en) | 2018-05-28 | 2018-05-28 | Shrimp larvae counting analysis method based on improved TV-L1 model |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108765448A CN108765448A (en) | 2018-11-06 |
CN108765448B true CN108765448B (en) | 2022-01-07 |
Family
ID=64002960
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810522933.5A Active CN108765448B (en) | 2018-05-28 | 2018-05-28 | Shrimp larvae counting analysis method based on improved TV-L1 model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108765448B (en) |
Families Citing this family (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112257564B (en) * | 2020-10-20 | 2022-07-12 | 青岛丰禾星普科技有限公司 | Aquatic product quantity statistical method, terminal equipment and storage medium |
CN113139934B (en) * | 2021-03-26 | 2024-04-30 | 上海师范大学 | Rice grain counting method |
CN113812370A (en) * | 2021-11-02 | 2021-12-21 | 广东科贸职业学院 | Shrimp larvae counting device and method based on visual identification technology |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW384451B (en) * | 1996-05-02 | 2000-03-11 | Lin Yi Hung | Counting system for shrimp and fish fry using mechanical visualization |
WO2017054775A1 (en) * | 2015-09-30 | 2017-04-06 | Shanghai United Imaging Healthcare Co., Ltd. | System and method for determining a breast region in a medical image |
WO2017221259A1 (en) * | 2016-06-23 | 2017-12-28 | S Jyothi | Automatic recognition of indian prawn species |
Family Cites Families (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20070165961A1 (en) * | 2006-01-13 | 2007-07-19 | Juwei Lu | Method And Apparatus For Reducing Motion Blur In An Image |
US9122930B2 (en) * | 2013-07-15 | 2015-09-01 | Digitalglobe Inc. | Automated remote car counting |
CN103700117A (en) * | 2013-11-21 | 2014-04-02 | 北京工业大学 | Robust optical flow field estimating method based on TV-L1 variation model |
CN106296749B (en) * | 2016-08-05 | 2019-10-18 | 天津大学 | RGB-D image eigen decomposition method based on L1 norm constraint |
CN106959133B (en) * | 2017-03-23 | 2020-05-12 | 贵州省机械电子产品质量监督检验院 | Light biological safety detection system for LED lighting product |
-
2018
- 2018-05-28 CN CN201810522933.5A patent/CN108765448B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
TW384451B (en) * | 1996-05-02 | 2000-03-11 | Lin Yi Hung | Counting system for shrimp and fish fry using mechanical visualization |
WO2017054775A1 (en) * | 2015-09-30 | 2017-04-06 | Shanghai United Imaging Healthcare Co., Ltd. | System and method for determining a breast region in a medical image |
WO2017221259A1 (en) * | 2016-06-23 | 2017-12-28 | S Jyothi | Automatic recognition of indian prawn species |
Non-Patent Citations (1)
Title |
---|
High-order TVL1-based images restoration and spatially adapted regularization parameter selection;Gang Liu;《Computers & Mathematics with Applications》;20140630;2015-2026 * |
Also Published As
Publication number | Publication date |
---|---|
CN108765448A (en) | 2018-11-06 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109447945B (en) | Quick counting method for basic wheat seedlings based on machine vision and graphic processing | |
CN108765448B (en) | Shrimp larvae counting analysis method based on improved TV-L1 model | |
CN111179216B (en) | Crop disease identification method based on image processing and convolutional neural network | |
CN112232978B (en) | Aquatic product length and weight detection method, terminal equipment and storage medium | |
CN106815819B (en) | More strategy grain worm visible detection methods | |
Duan et al. | An automatic counting system for transparent pelagic fish eggs based on computer vision | |
CN111406693A (en) | Marine ranch fishery resource maintenance effect evaluation method based on bionic sea eels | |
CN107123115B (en) | Real-time online detection method for grain harvesting and cleaning loss based on image processing | |
CN109859257B (en) | Skin image texture evaluation method and system based on texture directionality | |
CN111882561A (en) | Cancer cell identification and diagnosis system | |
Ghazal et al. | Automated framework for accurate segmentation of leaf images for plant health assessment | |
CN115861721B (en) | Livestock and poultry breeding spraying equipment state identification method based on image data | |
CN116246174B (en) | Sweet potato variety identification method based on image processing | |
Pratibha et al. | Analysis and identification of rice granules using image processing and neural network | |
CN115512215A (en) | Underwater biological monitoring method and device and storage medium | |
CN113484867B (en) | Method for detecting density of fish shoal in closed space based on imaging sonar | |
KR20200136004A (en) | Method for detecting cells with at least one malformation in a cell sample | |
CN113435460A (en) | Method for identifying brilliant particle limestone image | |
Oprisescu et al. | Automatic pap smear nuclei detection using mean-shift and region growing | |
CN116563768A (en) | Intelligent detection method and system for microplastic pollutants | |
CN115953352A (en) | Peanut seed selection evaluation and classification method based on network model | |
CN110458042B (en) | Method for detecting number of probes in fluorescent CTC | |
CN111667496B (en) | Adhered fish body image segmentation method and device | |
CN116523866B (en) | Wheat scab resistance identification method, system, electronic equipment and storage medium | |
CN117409403B (en) | Rice spike maturity estimation method based on deep learning |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |