Mosquito pupa chest width measuring method based on image processing

Automatic measurement of mosquito pupa breast width through image processing technology solves the problems of high subjectivity, low efficiency and unstable accuracy of traditional measurement methods, and achieves efficient and accurate measurement of mosquito pupa breast width, satisfying the fields of mosquito pupa research and breeding need.

CN119090808AActive Publication Date: 2024-12-06SUN YAT SEN UNIV
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411054536.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-12-06
Estimated Expiration
2044-08-02

AI Technical Summary

Technical Problem

The traditional method of measuring mosquito pupa breast width is high subjectivity, low efficiency and instable accuracy, which cannot meet the needs of mosquito pupa research and breeding.

Method used

Using an image-based processing method, the breast width of the mosquito pupa is automatically measured by taking RGB images, grayscale binarization, connectivity domain analysis, cephalo-thoracic pixel threshold determination, skeletonization processing and other steps, and the breast width of the mosquito pupa is converted in combination with the micro-size image. Achieve accurate chest width measurement.

Benefits of technology

The objective, efficient and accurate measurement of mosquito pupa breast width is achieved, reducing manpower investment and improving measurement accuracy and efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119090808A_ABST
    Figure CN119090808A_ABST
Patent Text Reader

Abstract

The invention discloses a mosquito pupa chest width measuring method based on image processing, and relates to the technical field of mosquito pupa breeding and mosquito pupa research, and the technical scheme is characterized in that the image is divided into a mosquito pupa part and a background part by processing the pixels of the image, and the ROI image area of the mosquito pupa is determined based on the maximum connected domain of the mosquito pupa part; then determining a mosquito pupa head and chest area with a darker color, drawing a vertical line for the center line of the mosquito pupa head and chest, determining the chest width of the mosquito pupa in the image through the intersection point of the vertical line and the outline of the mosquito pupa head and chest, and converting the mosquito pupa chest width in the image into the mosquito pupa chest width in the actual space by taking the micrometer image and the micrometer body shot at the same distance as the reference. The embodiment of the invention provides the method for measuring the chest width of the mosquito pupa through programmed image processing, and the mechanical measurement of the chest width of the mosquito pupa can be objectively, efficiently and accurately carried out. According to the invention, the problems of high subjectivity, low efficiency and unstable precision existing in manual measurement of the chest width of the mosquito pupa are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of mosquito pupa breeding and mosquito pupa research, and more specifically, to a method for measuring the chest width of mosquito pupae based on image processing. Background Art

[0002] In the breeding and research process of mosquito pupae, the chest width of mosquito pupae is an important biological parameter used to judge the growth status of mosquito pupae, species identification and risk assessment of disease transmission. The traditional method of measuring the chest width of mosquito pupae mainly relies on manual measurement, usually under a calibrated microscope, by manually pulling the chest width of mosquito pupae. There are problems such as high subjectivity, low efficiency, and unstable accuracy. In order to improve the measurement accuracy of the chest width of mosquito pupae and reduce manpower input, the existing technology urgently needs a more accurate, efficient and automated mosquito pupae chest width measurement solution to meet the needs of mosquito pupa research and breeding fields. Summary of the invention

[0003] In view of the problems of high subjectivity, low efficiency, and unstable precision in the manual measurement of the chest width of mosquito pupae in the prior art, the object of the present invention is to provide a method for measuring the chest width of mosquito pupae based on image processing, which comprises the following steps:

[0004] S1. Place a single mosquito pupa on a horizontal background plane, place a camera directly above the single mosquito pupa, with the abdomen of the mosquito pupa facing upward, and take an RGB image. The color of the horizontal background plane in the RGB image is different from the color of the mosquito pupa. Keep the camera position unchanged, place a micrometer on the horizontal background plane directly below the camera, and take a micrometer image. The color of the horizontal background plane in the micrometer image is different from the color of the micrometer.

[0005] S2. Convert the RGB image into a grayscale image, set a grayscale threshold, perform binarization on the grayscale image, divide the pixels in the grayscale image into a mosquito pupa part and a background part, and obtain a grayscale binary image.

[0006] The area in the RGB image that belongs to the mosquito pupa part in the grayscale binary image is taken as the research area.

[0007] S3. Perform a connected domain analysis and use the largest connected domain in the study area as the ROI image area of ​​mosquito pupae.

[0008] S4. Given a cephalothorax pixel threshold, the area in the ROI image region where the pixels are greater than or equal to the cephalothorax pixel threshold is taken as the mosquito pupa cephalothorax region.

[0009] S5. Calculate the minimum circumscribed rectangle of the mosquito pupa head and thorax, and use the longest midline of the minimum circumscribed rectangle as the center line of the mosquito pupa head and thorax. Select multiple points on the center line of the mosquito pupa head and thorax to make vertical lines, and each vertical line has two intersections with the contour of the mosquito pupa head and thorax. The distance between the two intersections on each vertical line is the width value corresponding to the vertical line. The maximum value of all width values ​​is used as the image chest width of the mosquito pupa.

[0010] S6, establishing a conversion ratio according to the actual size of the micrometer and the size of the micrometer in the micrometer image, and converting the chest width of the mosquito pupa in the image into the chest width of the mosquito pupa in the actual space by using the conversion ratio.

[0011] The present invention is further configured as follows: converting an RGB image into an HSV color model, giving a binarization threshold, performing binarization processing on the RGB image, dividing pixels in the RGB image into a mosquito pupa part and a background part, and obtaining an HSV binarized image; the binarization threshold is any one of a hue value, a saturation value, and a brightness value; and taking an area in the RGB image that belongs to the mosquito pupa part in both the grayscale binarized image and the HSV binarized image as a research area.

[0012] The present invention is further configured as follows: S4 also includes skeletonizing the mosquito pupa head and thorax region in the RGB image, and refining the contour of the mosquito pupa head and thorax region into a single pixel.

[0013] The present invention is further configured as follows: the skeletonization process adopts the Zhang-Suen algorithm.

[0014] The present invention is further configured such that the RGB image of the mosquito pupa taken by the photographing device is filtered and then used as the RGB image used by S2.

[0015] The present invention is further configured such that: the filtering process includes at least one of Gaussian filtering and median filtering.

[0016] The present invention is further configured as follows: the grayscale threshold is determined by an Otsu algorithm.

[0017] The present invention is further configured as follows: a method for determining a pixel threshold of the head and chest is as follows: pixels outside the ROI image area in the RGB image are unified as background pixels, the Euclidean distance from each pixel in the ROI image area to the nearest background pixel is calculated, a distance threshold is given, and pixels whose Euclidean distance from the ROI image area to the nearest background pixel is equal to the distance threshold are used as the pixel threshold of the head and chest.

[0018] The present invention is further configured as follows: the number of pixels of the largest connected domain in S3 is greater than 30,000.

[0019] The present invention is further configured as follows: in S6, at least 30 points are selected on the center line of the mosquito pupa head and thorax to form a vertical line.

[0020] The present invention is further configured as follows: in S1, the posture of the mosquito pupa is adjusted by a fine brush so that the abdomen of the mosquito pupa faces upward.

[0021] In summary, the present invention has the following beneficial effects compared with the prior art: the present invention divides the image into a mosquito pupa part and a background part by processing the pixels of the image, and determines the ROI image area of ​​the mosquito pupa based on the maximum connected domain of the mosquito pupa part, and then determines the darker mosquito pupa head and thorax area, draws a vertical line to the center line of the mosquito pupa head and thorax, determines the chest width of the mosquito pupa in the image through the intersection of the vertical line and the contour of the mosquito pupa head and thorax, and converts the mosquito pupa chest width in the image into the mosquito pupa chest width in the actual space with the micrometer image and the micrometer body taken at the same distance as a reference. The present invention provides a method for measuring the chest width of mosquito pupa by programmed image processing, which can objectively, efficiently and accurately perform mechanized measurement of the chest width of mosquito pupa. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 Schematic diagram of the process of the embodiment. DETAILED DESCRIPTION

[0023] The technical solution of the present invention will be clearly described below in conjunction with the accompanying drawings. Obviously, the described embodiments are not all embodiments of the present invention, and all other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the invention.

[0024] It should be noted that the directions or positional relationships indicated by terms such as “center”, “up”, “down”, “horizontal”, “left”, “right”, “front”, “back”, “lateral” and “longitudinal” are based on the directions or positional relationships shown in the accompanying drawings and are only for the convenience of describing the present invention and simplifying the description. They do not indicate or imply that the device or element referred to must have a specific direction, be constructed and operated in a specific direction, and therefore should not be understood as a limitation on the present invention.

[0025] Example

[0026] like Figure 1 As shown in FIG. 1 , it is a flow chart of a preferred embodiment of the present invention. This embodiment provides a method for measuring the chest width of mosquito pupae based on image processing, which comprises the following steps:

[0027] S1. Place a single mosquito pupa on the background horizontal plane, place the camera directly above the single mosquito pupa, adjust the posture of the mosquito pupa with a fine brush so that the abdomen of the mosquito pupa faces upward, and take an RGB image. The color of the background horizontal plane in the RGB image is different from the color of the mosquito pupa. Keep the camera position unchanged, place the micrometer on the background horizontal plane directly below the camera, and take a micrometer image. The color of the background horizontal plane in the micrometer image is different from the color of the micrometer.

[0028] Preferably, in this embodiment S1, the RGB image of the mosquito pupa taken by the shooting device is further filtered to reduce noise in the RGB image and improve the processing accuracy of subsequent steps. The filtering process includes at least one of Gaussian filtering and median filtering. In this embodiment, the filtering process is Gaussian filtering and median filtering.

[0029] S2, converting the RGB image into a grayscale image, giving a grayscale threshold, binarizing the grayscale image, dividing the pixels in the grayscale image into a mosquito pupa part and a background part, and obtaining a grayscale binary image. The grayscale threshold described in the present embodiment is determined by the Otsu algorithm. The Otsu algorithm uses a threshold to divide the data in the image into two categories: a mosquito pupa part and a background part. The grayscale of the pixels of the image in one category is less than this threshold, and the grayscale of the pixels of the image in the other category is greater than or equal to the threshold. The greater the inter-class variance between the mosquito pupa part and the background part, the greater the difference between the two parts constituting the image. The algorithm is simple and fast to calculate, and the probability of misclassification is minimal.

[0030] Further, the RGB image is converted into the HSV color model, a binary threshold is given, the RGB image is binarized, the pixels in the RGB image are divided into a mosquito pupa part and a background part, and an HSV binary image is obtained. The binary threshold is any one of a hue value, a saturation value, and a brightness value. The HSV color model objectively describes the color through three dimensions of hue, saturation, and brightness. The HSV color model is more sensitive to color information in the image. The binary threshold in the present embodiment is a saturation value.

[0031] Then, the area in the RGB image that belongs to the mosquito pupa in both the grayscale binary image and the HSV binary image is taken as the research area. By combining the grayscale and HSV color models, the two information of color and grayscale are used to reduce the influence of image noise on the accuracy of the segmentation results.

[0032] S3, perform connected domain analysis, and use the largest connected domain in the study area as the ROI image area of ​​the mosquito pupa. When the number of pixels of the largest connected domain is greater than 30,000, the subsequent measurement accuracy is better.

[0033] S4. Given a cephalothorax pixel threshold, based on the fact that the cephalothorax and trunk of mosquito pupae have different colors, the area in the ROI image area where the pixels are greater than or equal to the cephalothorax pixel threshold, that is, the darker cephalothorax area of ​​mosquito pupae is used as the cephalothorax area of ​​mosquito pupae. In this embodiment, the pixels outside the ROI image area in the RGB image are unified as background pixels, and after calculating the Euclidean distance from each pixel in the ROI image area to the nearest background pixel, a distance threshold is given, and the pixels in the ROI image area whose Euclidean distance to the nearest background pixel is equal to the distance threshold are used as the cephalothorax pixel threshold. In this embodiment, the color of the background horizontal plane in the RGB image is white, and the distance threshold is 160.

[0034] Specifically, the present embodiment further performs skeletonization processing on the mosquito pupa head and thorax region in the RGB image, and refines the contour of the mosquito pupa head and thorax region into a single pixel, so as to intuitively and quickly determine the contour of the mosquito pupa head and thorax. The skeletonization processing described in the present embodiment adopts the Zhang-Suen algorithm, which gradually refines the contour or target object in the image into a single pixel in an iterative manner. The Zhang-Suen algorithm can be implemented using the skeletonize function in the skimage.morphology module in Python programming.

[0035] S5. Calculate the minimum circumscribed rectangle of the mosquito pupa cephalothorax, and use the longest midline of the minimum circumscribed rectangle as the centerline of the mosquito pupa cephalothorax. Use the centerline of the mosquito pupa cephalothorax as the skeleton of the mosquito pupa cephalothorax, select multiple points on the centerline of the mosquito pupa cephalothorax as vertical lines, and each vertical line has two intersections with the contour of the mosquito pupa cephalothorax. The distance between the two intersections on each vertical line is the width value corresponding to the vertical line. The maximum value of all width values ​​is used as the image chest width of the mosquito pupa. Specifically, select at least 30 points on the centerline of the mosquito pupa cephalothorax as vertical lines.

[0036] S6, establishing a conversion ratio according to the actual size of the micrometer and the size of the micrometer in the micrometer image, and converting the chest width of the mosquito pupa in the image into the chest width of the mosquito pupa in the actual space by using the conversion ratio.

[0037] In summary, this embodiment processes the pixels of the image to divide the image into a mosquito pupa part and a background part, and determines the ROI image area of ​​the mosquito pupa based on the maximum connected domain of the mosquito pupa part, and then determines the darker mosquito pupa head and thorax area, draws a vertical line to the center line of the mosquito pupa head and thorax, and determines the chest width of the mosquito pupa in the image through the intersection of the vertical line and the contour of the mosquito pupa head and thorax, and converts the mosquito pupa chest width in the image into the mosquito pupa chest width in the actual space with the micrometer image and the micrometer body taken at the same distance as a reference. This embodiment provides a method for measuring the chest width of mosquito pupa by programmed image processing, which can objectively, efficiently and accurately perform mechanized measurement of the chest width of mosquito pupa.

[0038] The above description is only the preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A method for measuring the chest width of mosquito pupae based on image processing, characterized in that: The steps include: S1, placing a single mosquito pupa on a horizontal background plane, placing a shooting device directly above the single mosquito pupa with the abdomen of the mosquito pupa facing upward, and shooting an RGB image; the color of the horizontal background plane in the RGB image is different from the color of the mosquito pupa; keeping the position of the shooting device unchanged, placing a micrometer on the horizontal background plane directly below the shooting device, and shooting a micrometer image; the color of the horizontal background plane in the micrometer image is different from the color of the micrometer; S2, converting the RGB image into a grayscale image, giving a grayscale threshold, performing binarization processing on the grayscale image, dividing the pixels in the grayscale image into a mosquito pupa part and a background part, and obtaining a grayscale binary image; The area in the RGB image that belongs to the mosquito pupa part in the grayscale binary image is taken as the research area; S3, performing connected domain analysis, and taking the largest connected domain in the study area as the ROI image area of ​​mosquito pupae; S4, given a cephalothorax pixel threshold, the area in the ROI image region where the pixels are greater than or equal to the cephalothorax pixel threshold is taken as the mosquito pupa cephalothorax region; S5, calculating the minimum circumscribed rectangle of the mosquito pupa cephalothorax, taking the longest midline of the minimum circumscribed rectangle as the centerline of the mosquito pupa cephalothorax; selecting multiple points on the centerline of the mosquito pupa cephalothorax to make vertical lines, each vertical line having two intersection points with the contour of the mosquito pupa cephalothorax; the distance between the two intersection points on each vertical line is the width value corresponding to the vertical line; the maximum value among all the width values ​​is taken as the image chest width of the mosquito pupa; S6. Establish a conversion ratio according to the actual size of the micrometer and the size of the micrometer in the micrometer image; convert the image chest width of the mosquito pupa into the chest width of the mosquito pupa in the actual space by using the conversion ratio.

2. The method for measuring the chest width of mosquito pupae based on image processing according to claim 1, characterized in that: The RGB image is converted into an HSV color model, a binarization threshold is given, the RGB image is binarized, and pixels in the RGB image are divided into a mosquito pupa part and a background part to obtain an HSV binary image; the binarization threshold is any one of a hue value, a saturation value, and a brightness value; The area in the RGB image that belongs to the mosquito pupa part in both the grayscale binary image and the HSV binary image is taken as the research area.

3. A method for measuring the chest width of mosquito pupae based on image processing according to any one of claims 1-2, characterized in that: S4 also includes skeletonizing the mosquito pupa head and thorax region in the RGB image, and refining the contour of the mosquito pupa head and thorax region into a single pixel.

4. The method for measuring the chest width of mosquito pupae based on image processing according to claim 3 is characterized in that: The skeletonization process adopts the Zhang-Suen algorithm.

5. A method for measuring the chest width of mosquito pupae based on image processing according to any one of claims 1-2, characterized in that: The RGB image of the mosquito pupa taken by the shooting device is used as the RGB image used by S2 after filtering.

6. The method for measuring the chest width of mosquito pupae based on image processing according to claim 5, characterized in that: The filtering process includes at least one of Gaussian filtering and median filtering.

7. A method for measuring the chest width of mosquito pupae based on image processing according to any one of claims 1-2, characterized in that: The grayscale threshold is determined by the Otsu algorithm.

8. A method for measuring the chest width of mosquito pupae based on image processing according to any one of claims 1-2, characterized in that: The method for determining the pixel threshold of the head and thorax is as follows: the pixels outside the ROI image area in the RGB image are unified as background pixels, the Euclidean distance from each pixel in the ROI image area to the nearest background pixel is calculated, and the pixel whose Euclidean distance from the ROI image area to the nearest background pixel is equal to the distance threshold is used as the pixel threshold of the head and thorax.

9. A method for measuring the chest width of mosquito pupae based on image processing according to any one of claims 1-2, characterized in that: The number of pixels of the largest connected region in S3 is greater than 30,000.

10. The method for measuring the chest width of mosquito pupae based on image processing according to claim 9, characterized in that: In S5, at least 30 points are selected on the center line of the mosquito pupa head and thorax to make a vertical line.

Citation Information

Patent Citations

  • Method and system for extracting disease region-of-interest based on block tag

    CN103778428A

  • Method and system for measuring and calculating body posture of silkworm pupa based on image processing

    CN113112541A

  • Livestock body size measuring method based on depth camera and instance segmentation algorithm

    CN118015062A

  • Image processing apparatus and method, computer program, and storage medium

    US20060280363A1