Bone / filler grading intelligent detection method, system and equipment under non-uniform illumination condition
By collecting and processing bone/filler images under uneven lighting conditions, using the maximum inter-class variance method and the connectivity domain algorithm to eliminate shadows and extract features, input the neural network model to determine the particle size, solving the accuracy and efficiency of bone/filler grading detection in the prior art, and achieving efficient and accurate intelligent detection.
Patent Information
- Application Number
- CN202411825560.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-12
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-12-12
AI Technical Summary
The prior art is difficult to achieve accurate detection of bone/filler grading under uneven lighting conditions, resulting in low production efficiency and low detection accuracy.
By collecting bone/filler images on a red background, subtracting the larger values of the blue and green channels to generate grayscale images, binarization of images using the maximum inter-class variance method to eliminate shadows, extracting bone/filler features based on the connectivity domain algorithm, and inputting a neural network model to determine the particle size, and completing intelligent detection.
The precise detection of bone/filler grading under uneven lighting conditions is achieved, which improves production efficiency and detection accuracy, and meets the industry's demand for efficient, accurate and real-time monitoring.
Smart Images

Figure CN119693341A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent manufacturing technology, and in particular to a method, system and device for intelligently detecting bone / filler gradation under uneven illumination conditions. Background Art
[0002] In the field of railway / road construction, bone / filler is one of the main components of important building materials such as concrete and roadbed, and its grading characteristics directly affect the performance and durability of the final product. Traditional bone / filler grading detection methods usually rely on manual sampling and screening analysis in the laboratory. Although these methods are highly accurate, they have disadvantages such as being time-consuming, costly, and difficult to achieve real-time online monitoring. With the development of science and technology, non-contact bone / filler grading detection technology has gradually become a research hotspot. However, existing non-contact detection solutions are often greatly affected by environmental factors such as lighting conditions, especially in outdoor applications, where changes in natural light produce shadows, which in turn affect the accurate identification of bone / filler particle size. In addition, existing solutions still have shortcomings in dealing with complex backgrounds and changing environmental conditions, and it is difficult to meet the industry's needs for efficient, accurate, and real-time monitoring. Summary of the invention
[0003] The present invention provides a method, system and device for intelligent detection of bone / filler gradation under uneven lighting conditions, so as to solve the defects in the prior art that the bone / filler gradation cannot be detected in time, resulting in low production efficiency and low accuracy of bone / filler gradation, and can eliminate the influence of bone / filler shadows and perform accurate intelligent detection under uneven lighting conditions.
[0004] The present invention provides a bone / filler gradation intelligent detection method under uneven illumination conditions, comprising:
[0005] Acquire bone / filler images against a red background;
[0006] Determine the pixel value of the bone / filler grayscale image based on each pixel value of the red channel of the bone / filler image minus the larger value of the blue channel and the green channel at the corresponding position;
[0007] Binarizing the bone / filler grayscale image based on the maximum inter-class variance method to determine a binary image that eliminates the bone / filler shadow;
[0008] Based on the connected domain algorithm, each bone / filler in the binary image is extracted, and the area, perimeter, radius of the inscribed circle, and the major and minor axes of the circumscribed ellipse of each bone / filler are determined;
[0009] The area, perimeter, radius of the inscribed circle, and the major and minor axis sizes of the circumscribed ellipse of each bone / filler are input into the pre-built neural network model to determine the particle size of each bone / filler and complete the bone / filler grading detection.
[0010] According to the bone / filler gradation intelligent detection method under uneven illumination conditions provided by the present invention, the bone / filler gradation detection is completed by determining the particle size of each bone / filler, including:
[0011] Based on the particle size of each bone / filler output by the neural network model, a grading curve of the current bone / filler is generated.
[0012] According to the intelligent detection method of bone / filler gradation under non-uniform illumination conditions provided by the present invention, the neural network model is trained in the following manner:
[0013] The neural network model data set was constructed using the area, perimeter, radius of the inscribed circle, and the major and minor axes of the circumscribed ellipse of different bones / fillers as input parameters and the particle size as output parameter;
[0014] The neural network model data set pair is trained to obtain the neural network model.
[0015] According to the bone / filler gradation intelligent detection method under uneven illumination conditions provided by the present invention, the pixel value of the bone / filler grayscale image is determined by subtracting the larger value of the blue channel and the green channel at the corresponding position from each pixel value of the red channel of the bone / filler image, including:
[0016] Extract the red channel pixel value, blue channel pixel value, and green channel pixel value of the bone / filler image under the red background respectively;
[0017] Based on formula (1), the red channel pixel value, blue channel pixel value, and green channel pixel value of the bone / filler image under the red background are transformed:
[0018] Image_new=max(0,R-max(G,B))(1)
[0019] Where R represents the pixel value of the red channel of the bone / filler image, G represents the pixel value of the green channel of the bone / filler image, B represents the pixel value of the blue channel of the bone / filler image, max(G,B) represents the larger value of the green and blue channels, R-max(G,B) represents calculating the difference between the value of the red channel and the larger value of the green and blue channels, max(0,R-max(G,B)) represents ensuring that the calculation result will not be negative, if the result of R-max(G,B) is less than 0, then output 0, otherwise output the result of R-max(G,B), Image_new represents the pixel value of the bone / filler grayscale image.
[0020] According to the intelligent detection method for bone / filler gradation under uneven illumination conditions provided by the present invention, the bone / filler grayscale image is binarized based on the maximum inter-class variance method to determine the binarized image that eliminates the bone / filler shadow, including:
[0021] Based on the histogram of the bone / filler grayscale image, the minimum value between the two peaks of the bone / filler and the background is found as a threshold, and the image is divided into two parts, the bone / filler and the background, based on the threshold, so as to separate the bone / filler from the background;
[0022] Use the erosion operation to reduce noise points, and then use the dilation operation to fill the small holes inside the bone / filler. Use the opening operation, first erosion and then dilation to remove small noise and smooth the boundary of the bone / filler. Use the closing operation, first dilation and then erosion to fill the small holes inside the bone / filler, and obtain a binary image with the shadow of the bone / filler eliminated.
[0023] According to the bone / filler gradation intelligent detection method under uneven illumination conditions provided by the present invention, the connected domain algorithm is used to extract each bone / filler in the binary image, and determine the area, perimeter, inscribed circle radius, and major and minor axis size of the circumscribed ellipse of each bone / filler, including:
[0024] By marking the connected domains of the bone / filler grayscale image, a unique label is assigned to each connected region, and the area, perimeter, radius of the inscribed circle, and major and minor axes of the circumscribed ellipse of each connected domain are obtained.
[0025] The present invention also provides a bone / filler gradation intelligent detection system under uneven illumination conditions, comprising:
[0026] An acquisition module, used for acquiring bone / filler images under a red background;
[0027] A first determination module is used to subtract the larger value of the blue channel and the green channel at the corresponding position from each pixel value of the red channel as the pixel value of the bone / filler grayscale image;
[0028] The second determination module is used to binarize the bone / filler grayscale image by using the maximum inter-class variance method to determine the bone / filler grayscale image with the bone / filler shadow eliminated;
[0029] The third determination module is used to extract each bone / filler in the binary image based on the connected domain algorithm, and determine the area, perimeter, radius of the inscribed circle, and the major and minor axis sizes of the circumscribed ellipse of each bone / filler;
[0030] The fourth determination module determines the particle size of each bone / filler based on a pre-built neural network model and completes intelligent detection of bone / filler grading.
[0031] The present invention also provides an electronic device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, any of the above-mentioned intelligent detection methods for bone / filler grading under uneven illumination conditions is implemented.
[0032] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned intelligent detection methods for bone / filler grading under uneven illumination conditions.
[0033] The present invention also provides a computer program product, comprising a computer program, which, when executed by a processor, implements any of the above-mentioned intelligent detection methods for bone / filler gradation under uneven illumination conditions.
[0034] In the intelligent detection method of bone / filler gradation under uneven illumination conditions provided by the present invention, the pixel value of the bone / filler grayscale image can be obtained by subtracting the larger value of the blue channel and the green channel at the corresponding position from each pixel value of the red channel of the bone / filler image under the red background captured by the camera, and the pixel value of the bone / filler image is binarized by using the maximum inter-class variance method to obtain the bone / filler grayscale image with the bone / filler shadow eliminated, and then the single bone / filler is separated by a connected domain algorithm to calculate the area, perimeter, inscribed circle radius and the major axis and minor axis size of the circumscribed ellipse of the single bone / filler; the area, perimeter, inscribed circle radius and the major axis and minor axis size of the circumscribed ellipse of the bone / filler are input into a pre-constructed neural network model, and the bone / filler particle size is output, thereby completing the intelligent detection of bone / filler gradation; BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0036] Figure 1 It is a flow chart of a method for intelligently detecting bone / filler gradation under uneven illumination conditions provided by an embodiment of the present invention;
[0037] Figure 2 is a schematic diagram of a bone / filler image with shadows removed provided by an embodiment of the present invention;
[0038] Figure 3 is a schematic diagram of a gradation curve provided by an embodiment of the present invention;
[0039] Figure 4is a structural schematic diagram of a bone / filler gradation intelligent detection system under uneven illumination conditions provided by an embodiment of the present invention;
[0040] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0041] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] Figure 1 It is a flowchart of the intelligent detection method provided by an embodiment of the present invention.
[0043] like Figure 1 As shown, this embodiment provides a bone / filler gradation intelligent detection method under uneven illumination conditions, comprising:
[0044] Step 101, collecting a bone / filler image against a red background.
[0045] Step 102, based on each pixel value of the red channel of the bone / filler image minus the larger value of the blue channel and the green channel at the corresponding position, determine the pixel value of the bone / filler grayscale image.
[0046] Step 103: binarize the bone / filler grayscale image based on the maximum inter-class variance method to determine a binarized image with bone / filler shadows eliminated.
[0047] Step 104, based on the connected domain algorithm, each bone / filler in the binary image is extracted, and the area, perimeter, radius of the inscribed circle, and the major and minor axes of the circumscribed ellipse of each bone / filler are determined.
[0048] Step 105, input the area, perimeter, radius of the inscribed circle and the major and minor axes of each bone / filler into the pre-built neural network model to determine the particle size of each bone / filler and complete the bone / filler grading detection.
[0049] Bone / filler refers to the granular material that serves as the skeleton and filler in concrete and mortar.
[0050] Bone / filler grading refers to the mixing and matching of bones / fillers of various sizes in a certain proportion.
[0051] Bone / filler shadow refers to the shadow produced by the bone / filler on the background under uneven lighting conditions. In this embodiment, it is assumed that the lighting conditions are uneven and the bone / filler will produce obvious shadows.
[0052] Figure 2 Schematic diagram of the bone / filler image recognition process provided by an embodiment of the present invention.
[0053] like Figure 2 As shown, in actual applications, after collecting the bone / filler image under the red background, the pixel value of the bone / filler grayscale image is determined based on each pixel value of the red channel of the bone / filler image minus the larger value of the blue channel and the green channel at the corresponding position, so that the difference between the bone / filler and the bone / filler shadow is further obvious, and then the bone / filler grayscale image is binarized by the maximum inter-class variance method to eliminate the bone / filler shadow.
[0054] Figure 3 It is a schematic diagram of a grading curve provided by an embodiment of the present invention.
[0055] like Figure 3 As shown, in actual applications, after determining the equivalent particle size of each bone / filler, a grading curve can be generated based on the equivalent particle size of each bone / filler, and the grading curve can be used to characterize the grading of the bone / filler.
[0056] in Figure 3 The standard bone / filler grading curve is 5mm-20mm.
[0057] In the intelligent detection method for bone / filler gradation under uneven illumination conditions provided in the present embodiment, bones / fillers under a red background are first collected by a camera, and the pixel value of the bone / filler grayscale image is determined by subtracting the larger value of the blue channel and the green channel at the corresponding position from each pixel value of the red channel of the bone / filler image, and then the bone / filler grayscale image is binarized by the maximum inter-class variance method to determine the binarized image with the bone / filler shadow eliminated, and each bone / filler in the binarized image is separated by a connected domain algorithm to determine the area, perimeter, inscribed circle radius and major axis and minor axis size of each bone / filler, and the pre-constructed neural network model is input based on the area, perimeter, inscribed circle radius and major axis and minor axis size of each bone / filler to determine the particle size of each bone / filler, and complete the bone / filler gradation detection;
[0058] In an exemplary embodiment, the camera is parallel to the bone / filler plane, and the distance between the camera and the bone / filler plane is constant.
[0059] In an exemplary embodiment, the neural network model is trained in the following manner:
[0060] A neural network model dataset was constructed based on the area, perimeter, radius of the inscribed circle, and the major and minor axis sizes of the circumscribed ellipse of different bones / fillers as input parameters and the particle size as output parameter;
[0061] The neural network model data set pair is trained to obtain the neural network model.
[0062] In practical applications, the training set can be trained based on the Tensorflow deep learning framework combined with the MLP neural network structure, which can improve the accuracy of the trained semantic segmentation model.
[0063] In an exemplary embodiment, determining the size of each bone / filler area, perimeter, inscribed circle radius, and major and minor axis of the circumscribed ellipse includes:
[0064] In the Python program, the findContours module in the OpenCV software library is used to extract the bone / filler contours in the binary image, and then the contourArea module in the OpenCV software library is used to calculate the area S of each bone / filler contour based on the bone / filler contours. pixel , the perimeter L of each bone / filler contour is calculated using the arcLength module in the OpenCV software library pixel The major and minor axes a and b of the minimum circumscribed ellipse of each bone / filler are calculated through the cv2.fitEllipse module, and the radius r of the inscribed circle of each bone / filler is calculated through the cv2.minEnclosingCircle module.
[0065] In an exemplary embodiment, a neural network model data set is constructed based on the area, perimeter, radius of the inscribed circle, and the major and minor axis sizes of the circumscribed ellipse of different bones / fillers as input parameters and the particle size as output parameter, including:
[0066] Collect images of bone / filler with different particle sizes;
[0067] The pixel value of the bone / filler grayscale image is determined by subtracting the larger value of the blue channel and the green channel at the corresponding position from each pixel value of the red channel of the bone / filler image. The bone / filler grayscale image is binarized based on the maximum inter-class variance method to determine the binary image with the bone / filler shadow eliminated. Each bone / filler in the binary image is separated based on the connected domain algorithm, and the area, perimeter, radius of the inscribed circle, and the major and minor axis sizes of the circumscribed ellipse of each bone / filler are determined as the input parameters of the data set;
[0068] The actual particle size of each bone / filler was detected by sieving method as the output parameter of the data set.
[0069] And the data set is divided into a training set, a validation set and a test set. In the process of training a neural network model based on the neural network data set, the training set can be used for training, and the trained neural network model can be verified and tested based on the validation set and the test set.
[0070] In an exemplary embodiment, the size of each bone / filler particle is determined and the bone / filler grading test is completed by:
[0071] The area, perimeter, radius of the inscribed circle, and the major and minor axis sizes of the circumscribed ellipse of each bone / filler are input into the pre-built MLP neural network model, and the particle size of each bone / filler is output to generate the grading curve of the bone / filler.
[0072] In an exemplary embodiment, each pixel value of the red channel of the bone / filler image is not based on the larger value of the blue channel and the green channel at the corresponding position, and is determined by:
[0073] In the Python program, the red channel pixel value, blue channel pixel value, and green channel pixel value of the bone / filler image under the red background are respectively extracted through the split module in the OpenCV software library;
[0074] Based on formula (1), the above three channel pixel values are transformed
[0075] Image_new=max(0,R-max(G,B))(1)
[0076] Where R represents the pixel value of the red channel of the bone / filler image, G represents the pixel value of the green channel of the bone / filler image, B represents the pixel value of the blue channel of the bone / filler image, max(G,B) represents the larger value of the green and blue channels, R-max(G,B) represents calculating the difference between the value of the red channel and the larger value of the green and blue channels, max(0,R-max(G,B)) represents ensuring that the calculation result will not be negative, if the result of R-max(G,B) is less than 0, then output 0, otherwise output the result of R-max(G,B), Image_new represents the pixel value of the bone / filler grayscale image.
[0077] In an exemplary embodiment, the bone / filler grayscale image is binarized based on the maximum inter-class variance method, including:
[0078] Calculate the grayscale histogram of the image. The histogram shows the number of pixels at each grayscale level. Look for two obvious peaks in the histogram, which usually correspond to the grayscale distribution of the bone / filler and background areas. There will be a local minimum point between the two peaks, which can be used as a threshold. The minimum value between the two peaks is selected as the threshold. This threshold is used to segment the image into two parts: the part above the threshold is considered to be bone / filler, and the part below the threshold is considered to be background. Use the erosion operation to eliminate small noise points in the image. Select a suitable structural element (such as a 3x3 or 5x5 square structural element) to erode the binarized image to remove or reduce isolated small areas. Then, use the dilation operation to restore the size of the bone / filler area and fill the small holes caused by the erosion operation. Dilation also requires the selection of a suitable structural element (such as a 3x3 or 5x5 square structural element). Based on the histogram of the bone / filler grayscale image, find the minimum value between the two peaks of bone / filler and background as the threshold to divide the image into two parts, bone / filler and background, so that the bone / filler and background are separated.
[0079] Use the erosion operation to reduce noise points, and then use the dilation operation to fill the small holes inside the bone / filler. Use the opening operation, first erosion and then dilation to remove small noise and smooth the boundaries of the bone / filler. Use the closing operation, first dilation and then erosion to fill the small holes inside the bone / filler.
[0080] In an exemplary embodiment, each bone / filler in the binary image is extracted based on a connected domain algorithm, including:
[0081] By marking the connected domains of the bone / filler grayscale image, a unique label is assigned to each connected region, and the area, perimeter, radius of the inscribed circle, and major and minor axes of the circumscribed ellipse of each connected domain are obtained.
[0082] The intelligent detection system for bone / filler gradation under uneven lighting conditions provided by the present invention is described below. The intelligent detection system for bone / filler gradation under uneven lighting conditions described below and the intelligent detection method for bone / filler gradation under uneven lighting conditions described above can be referenced to each other.
[0083] Figure 4 It is a schematic diagram of the structure of the intelligent detection system provided by an embodiment of the present invention.
[0084] like Figure 4 As shown, the bone / filler gradation intelligent detection system under uneven illumination conditions provided in this embodiment includes:
[0085] An acquisition module 301 is used to acquire bone / filler images under a red background;
[0086] A first determination module 302 is used to subtract the larger value of the blue channel and the green channel at the corresponding position from each pixel value of the red channel as the pixel value of the bone / filler grayscale image;
[0087] The second determination module 303 is used to binarize the bone / filler grayscale image by using the maximum inter-class variance method to determine the bone / filler grayscale image with the bone / filler shadow eliminated;
[0088] The third determination module 304 is used to extract each bone / filler in the binary image based on the connected domain algorithm, and determine the area, perimeter, radius of the inscribed circle, and the major and minor axis of the circumscribed ellipse of each bone / filler;
[0089] The fourth determination module 305 determines the particle size of each bone / filler based on the pre-built neural network model, and completes the intelligent detection of bone / filler grading.
[0090] The specific implementation method of the intelligent detection system for bone / filler gradation under uneven illumination conditions provided in this embodiment can be implemented with reference to the above embodiments, which will not be described in detail here.
[0091] Figure 5 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the bone / filler gradation intelligent detection method under uneven illumination conditions, the method comprising:
[0092] Acquire bone / filler images against a red background;
[0093] Determine the pixel value of the bone / filler grayscale image based on each pixel value of the red channel of the bone / filler image minus the larger value of the blue channel and the green channel at the corresponding position;
[0094] Binarizing the bone / filler grayscale image based on the maximum inter-class variance method to determine a binary image that eliminates the bone / filler shadow;
[0095] Based on the connected domain algorithm, each bone / filler in the binary image is separated, and the area, perimeter, radius of the inscribed circle, and the major and minor axes of the circumscribed ellipse of each bone / filler are determined;
[0096] Based on the area, perimeter, radius of the inscribed circle, and the major and minor axis sizes of the circumscribed ellipse of each bone / filler, the pre-built neural network model is input to determine the particle size of each bone / filler and complete the bone / filler grading detection;
[0097] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, RandomAccess Memory), disk or optical disk, etc. Various media that can store program codes.
[0098] On the other hand, the present invention further provides a computer program product, which includes a computer program. The computer program can be stored in a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the bone / filler gradation intelligent detection method under uneven illumination conditions provided by the above methods, and the method includes:
[0099] Acquire bone / filler images against a red background;
[0100] Determine the pixel value of the bone / filler grayscale image based on each pixel value of the red channel of the bone / filler image minus the larger value of the blue channel and the green channel at the corresponding position;
[0101] Binarizing the bone / filler grayscale image based on the maximum inter-class variance method to determine a binary image that eliminates the bone / filler shadow;
[0102] Based on the connected domain algorithm, each bone / filler in the binary image is separated, and the area, perimeter, radius of the inscribed circle, and the major and minor axes of the circumscribed ellipse of each bone / filler are determined;
[0103] Based on the area, perimeter, radius of the inscribed circle, and the major and minor axis sizes of the circumscribed ellipse of each bone / filler, a pre-built neural network model is input to determine the particle size of each bone / filler and complete the bone / filler grading detection.
[0104] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which is implemented when the computer program is executed by a processor to perform the bone / filler gradation intelligent detection method under non-uniform illumination conditions provided by the above methods, the method comprising:
[0105] Acquire bone / filler images against a red background;
[0106] Determine the pixel value of the bone / filler grayscale image based on each pixel value of the red channel of the bone / filler image minus the larger value of the blue channel and the green channel at the corresponding position;
[0107] Binarizing the bone / filler grayscale image based on the maximum inter-class variance method to determine a binary image that eliminates the bone / filler shadow;
[0108] Based on the connected domain algorithm, each bone / filler in the binary image is separated, and the area, perimeter, radius of the inscribed circle, and the major and minor axes of the circumscribed ellipse of each bone / filler are determined;
[0109] Based on the area, perimeter, radius of the inscribed circle, and the major and minor axis sizes of the circumscribed ellipse of each bone / filler, a pre-built neural network model is input to determine the particle size of each bone / filler and complete the bone / filler grading detection.
[0110] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, i.e., they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative effort.
[0111] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods of each embodiment or some parts of the embodiment.
[0112] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. An intelligent detection method for bone / filler gradation under uneven illumination conditions, characterized in that: include: Acquire bone / filler images against a red background; Determine the pixel value of the bone / filler grayscale image based on each pixel value of the red channel of the bone / filler image minus the larger value of the blue channel and the green channel at the corresponding position; Binarizing the bone / filler grayscale image based on the maximum inter-class variance method to determine a binary image that eliminates the bone / filler shadow; Based on the connected domain algorithm, each bone / filler in the binary image is extracted, and the area, perimeter, radius of the inscribed circle, and the major and minor axes of the circumscribed ellipse of each bone / filler are determined; The area, perimeter, radius of the inscribed circle, and the major and minor axis sizes of the circumscribed ellipse of each bone / filler are input into the pre-built neural network model to determine the particle size of each bone / filler and complete the bone / filler grading detection.
2. The intelligent detection method of bone / filler gradation under non-uniform illumination conditions according to claim 1, characterized in that: Determining the particle size of each bone / filler and completing the bone / filler grading test includes: Based on the particle size of each bone / filler output by the neural network model, a grading curve of the current bone / filler is generated.
3. The intelligent detection method of bone / filler gradation under uneven illumination conditions according to claim 1, characterized in that: The neural network model is trained in the following way: The neural network model data set was constructed using the area, perimeter, radius of the inscribed circle, and the major and minor axes of the circumscribed ellipse of different bones / fillers as input parameters and the particle size as output parameter; The neural network model data set pair is trained to obtain the neural network model.
4. The intelligent detection method of bone / filler gradation under non-uniform illumination conditions according to claim 1, characterized in that: The step of subtracting the larger value of the blue channel and the green channel at the corresponding position from each pixel value of the red channel of the bone / filler image to determine the pixel value of the bone / filler grayscale image comprises: Extract the red channel pixel value, blue channel pixel value, and green channel pixel value of the bone / filler image under the red background respectively; Based on formula (1), the red channel pixel value, blue channel pixel value, and green channel pixel value of the bone / filler image under the red background are transformed: Image_new=max(0,R-max(G,B))(1) Where R represents the pixel value of the red channel of the bone / filler image, G represents the pixel value of the green channel of the bone / filler image, B represents the pixel value of the blue channel of the bone / filler image, max(G,B) represents the larger value of the green and blue channels, R-max(G,B) represents calculating the difference between the value of the red channel and the larger value of the green and blue channels, max(0,R-max(G,B)) represents ensuring that the calculation result will not be negative, if the result of R-max(G,B) is less than 0, then output 0, otherwise output the result of R-max(G,B), Image_new represents the pixel value of the bone / filler grayscale image.
5. The intelligent detection method of bone / filler gradation under non-uniform illumination conditions according to claim 1, characterized in that: The method of binarizing the bone / filler grayscale image based on the maximum inter-class variance method to determine the binarized image with the bone / filler shadow eliminated includes: Based on the histogram of the bone / filler grayscale image, the minimum value between the two peaks of the bone / filler and the background is found as a threshold, and the image is divided into two parts, the bone / filler and the background, based on the threshold, so as to separate the bone / filler from the background; Use the erosion operation to reduce noise points, and then use the dilation operation to fill the small holes inside the bone / filler. Use the opening operation, first erosion and then dilation to remove small noise and smooth the boundary of the bone / filler. Use the closing operation, first dilation and then erosion to fill the small holes inside the bone / filler, and obtain a binary image with the shadow of the bone / filler eliminated.
6. The intelligent detection method of bone / filler gradation under non-uniform illumination conditions according to claim 1, characterized in that: The method based on the connected domain algorithm extracts each bone / filler in the binary image, and determines the area, perimeter, radius of the inscribed circle, and major and minor axis of the circumscribed ellipse of each bone / filler, including: By marking the connected domains of the bone / filler grayscale image, a unique label is assigned to each connected region, and the area, perimeter, radius of the inscribed circle, and major and minor axes of the circumscribed ellipse of each connected domain are obtained.
7. An intelligent bone / filler gradation detection system under uneven illumination conditions, characterized in that: include: An acquisition module, used for acquiring bone / filler images under a red background; A first determination module is used to subtract the larger value of the blue channel and the green channel at the corresponding position from each pixel value of the red channel as the pixel value of the bone / filler grayscale image; The second determination module is used to binarize the bone / filler grayscale image by using the maximum inter-class variance method to determine the bone / filler grayscale image with the bone / filler shadow eliminated; The third determination module is used to extract each bone / filler in the binary image based on the connected domain algorithm, and determine the area, perimeter, radius of the inscribed circle, and the major and minor axis sizes of the circumscribed ellipse of each bone / filler; The fourth determination module determines the particle size of each bone / filler based on a pre-built neural network model and completes intelligent detection of bone / filler grading.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the program, the intelligent detection method for bone / filler gradation under uneven lighting conditions as described in any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Laser stripe image reinforcing and de-noising method based on color space conversion
CN105957023A
Water meter recognition method based on dynamic image processing
CN107220645A
Intelligent detection method, system and equipment for gradation of aggregates with different depths of field in stock bin
CN117495843A
Method and system for evaluating visual quality of washed stone surface layer
CN118822944A