A binocular color recognition method integrating learning mechanism
By incorporating a binocular color recognition method based on learning mechanisms, the problem of recognition accuracy in binocular vision during scene changes has been solved. This method achieves efficient recognition and precise control through self-learning, meeting the satisfaction needs of professionals.
Patent Information
- Application Number
- CN202111551887.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-17
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2041-12-17
AI Technical Summary
Existing binocular vision technology cannot accurately identify target objects when the scene changes, and the color difference of goji berries from different places of origin leads to a decrease in recognition accuracy. Traditional methods require re-teaching, which is time-consuming and laborious, and there is no fixed paradigm, which cannot meet the satisfaction of practitioners.
The binocular color recognition method, which incorporates a learning mechanism, determines whether the recognition threshold needs to be revised. It then performs CCD calibration and acquisition, noise reduction processing, RGB three primary color acquisition and mean calculation to form an association matrix. The threshold is calculated using the equidistant method and the plane proportion algorithm is called for recognition. It also incorporates feedback from industry professionals for self-learning.
Self-learning in new scenarios saves time and effort, and the self-learning results meet the satisfaction of practitioners, improving recognition accuracy and control precision.
Smart Images

Figure CN114332442B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a binocular color recognition method integrating a learning mechanism and belongs to the technical field of intelligent detection and image vision. BACKGROUND
[0002] Binocular vision has become a mainstream technology for recognizing target images, and relevant institutions are vigorously promoting binocular vision technology. The positioning and recognition technology of target objects by binocular vision has been relatively mature, but there are still some heavy points in application scenarios that need to be broken through. How to effectively improve the recognition accuracy in multiple scenes and accurately control according to the recognition effect is one of the "neck-stiffening" problems faced by the current image vision industry.
[0003] Taking a wolfberry automatic picking system as an example, the binocular color recognition is faced with the following difficulties: first, the traditional binocular system locks the color parameters, and needs to be re-taught in new scene applications, which is time-consuming and laborious and has no fixed paradigm. The teaching result cannot reach the satisfaction degree of practitioners or relevant engineers. Secondly, there are color differences in wolfberries from different places, such as Gansu compared with Anhui, which have great color differences. SUMMARY
[0004] To solve the problems of the prior art, the purpose of the present application is to provide a binocular color recognition method integrating a learning mechanism, which solves the problem of inaccurate recognition in scene replacement in the prior art.
[0005] In order to achieve the above-mentioned target, the technical scheme adopted by the present application is as follows:
[0006] A binocular color recognition method integrating a learning mechanism, comprising the following steps:
[0007] Determining whether the recognition threshold needs to be revised in a new scene. If not, directly performing binocular recognition, otherwise entering the threshold revision stage;
[0008] In the threshold revision stage, CCD calibration collection is performed;
[0009] The extracted data is denoised to eliminate the image noise background;
[0010] The processed data is collected for RGB three primary colors and the mean value is calculated;
[0011] The redundant repetition strategy is issued to practitioners for binary classification recognition, and an association matrix of image RGB three primary colors and recognition results is formed;
[0012] The threshold values of R, G and B are calculated by using the equidistant method;
[0013] The plane proportion algorithm is updated and called for binocular recognition;
[0014] The identification result is transmitted to the arrayed vibration component to perform accurate picking.
[0015] Further, the aforementioned method for determining whether the identification threshold needs to be revised in the new scenario is manual determination or automatic system determination.
[0016] Further, in the aforementioned threshold revision stage, the CCD calibration collection includes the following specific operations:
[0017] Image shooting is performed on the target population, T images of the target population are collected, and CCD calibration collection is performed on each image.
[0018] Further, the aforementioned step of collecting RGB three primary colors of the processed data and calculating the mean value includes:
[0019] Each pixel point in each image is traversed respectively, the RGB three primary colors of each pixel point are extracted, the red pixel, green pixel, and blue pixel statistical values are counted, and the statistical mean values of the red pixel, green pixel, and blue pixel on each image are obtained through a formula, wherein the formula is
[0020]
[0021]
[0022]
[0023] R k represents the R statistical mean value in the kth image; G k represents the G statistical mean value in the kth image; and B k represents the B statistical mean value in the kth image; image k .at(Vec3b).(i,j)[r] represents the R statistical value of the i-th row and j-th column pixel point in the kth image, image k .at(Vec3b).(i,j)[g] represents the G statistical value of the i-th row and j-th column pixel point in the kth image, image k .at(Vec3b).(i,j)[b] represents the B statistical value of the i-th row and j-th column pixel point in the kth image, and k ∈ (1, 2, …, T).
[0024] Further, the aforementioned specific step of forming the correlation matrix of the image RGB three primary colors and the identification result includes:
[0025] The same image is sent to several employees for identification. If the employees determine that the fruit is ripe through the image, the identification result is output as Y, otherwise it is output as N, and finally the correlation matrix is obtained.
[0026] wherein [Rm-n G m-n B m-n [,Y] represents the recognition result Y of the nth practitioner on the image with image number m, and the RGB statistical mean R extracted from the image with image number m. m G m B m Assign it to R m-n G m-n B m-n ;
[0027] [R t-s G t-s B t-s [,N] represents the recognition result N of the image with sequence number t performed by the s-th practitioner, and the RGB statistical mean R extracted from the image with sequence number t. t G t B t Assign it to R t-s G t-s B t-s .
[0028] Furthermore, the threshold R of R, G, and B is calculated using the equidistant method mentioned above. thod G thod B thod The process includes:
[0029] All matrices are classified based on the identification results Y / N;
[0030] For the matrix R in the recognition result Y m-n G m-n B m-n Calculate their mean values separately, and then calculate R in the matrix with N recognition results. t-s G t-s B t-s Calculate the mean of each group separately, and then take the median of the two groups of means to obtain the threshold R of R, G, and B. thod G thod B thod .
[0031] Furthermore, the aforementioned steps of updating and invoking the planar proportion algorithm for binocular recognition include:
[0032] Update the new threshold after input.
[0033] Segment the newly acquired images in real time.
[0034] Iterate through all pixels in the cropped image and identify the RGB value of each pixel using binocular vision color recognition.
[0035] The measured RGB value R of each pixelx , G x , B x respectively, if R thod , G thod , B thod , then the next operation is executed, otherwise the comparison of the next pixel point is skipped. x >R thod and G x >G thod and B x >B thod .
[0036] The number of passed pixel points is accumulated, and the accumulated pixel point number is divided by the total number of pixel points on the image to obtain an initial ratio.
[0037] A passing ratio is set, and if the initial ratio exceeds the passing ratio, it is identified as mature.
[0038] Further, the aforementioned passing ratio is set to 20%.
[0039] The beneficial effects achieved by the present application are:
[0040] 1. In a new scene, self-learning is performed through a fixed paradigm, which saves time and effort, and during the self-learning process, practitioners intervene, so that the self-learning result can meet the satisfaction of relevant personnel. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 is the flowchart of the identification method of the present application;
[0042] Figure 2 is the flowchart of the proportion algorithm of the present application. DETAILED DESCRIPTION
[0043] The present application will be further described below in conjunction with the drawings. The following examples are only used to more clearly illustrate the technical solutions of the present application, and cannot be used to limit the protection scope of the present application.
[0044] As Figure 1 described above, the binocular color recognition method with learning mechanism is as follows:
[0045] a) In a new scene, it is determined whether the recognition threshold needs to be revised, if not, binocular recognition is directly performed, otherwise, the threshold revision stage is entered, the determination method can be artificial determination or automatic system determination.
[0046] b) In the threshold revision stage, first, the target population is imaged, and multiple images of the target population are collected (the total number of images is denoted as T), CCD calibration collection is performed, and data is extracted.
[0047] c) noise reduction processing on the extracted data, eliminating image noise background, taking the wolfberry image as an example, excluding the influence of green leaves, yellow land, etc., only keeping the red fruit image, and pre-processing the fruit image.
[0048] d) collecting RGB three primary colors of the processed data and calculating the mean value, that is, traversing all pixel points in each image, extracting the RGB three primary colors of each pixel point, counting the red, green and blue pixel statistics, and summing up to obtain the statistical mean value of red, green and blue pixels on each image:
[0049]
[0050]
[0051]
[0052] wherein R k represents the R statistical mean value in the kth image; G k represents the G statistical mean value in the kth image; B k represents the B statistical mean value in the kth image; image k .at(Vec3b).(i,j)[r] represents the R statistical value of the i-th row and j-th pixel point in the kth image, image k .at(Vec3b).(i,j)[g] represents the G statistical value of the i-th row and j-th pixel point in the kth image, image k .at(Vec3b).(i,j)[b] represents the B statistical value of the i-th row and j-th pixel point in the kth image, k∈(1,2, …, T).
[0053] e) issuing to the practitioners with a redundant repetition strategy, performing binary classification recognition, and forming the association matrix of image RGB three primary colors and recognition results shown in Table 1:
[0054] The same image is given to several practitioners for identification. If the practitioner determines the fruit maturity through the image, the identification result is output as Y, otherwise as N, and finally the association matrix is obtained. Wherein [R m-n , G m-n , B m-n , Y] represents that the nth practitioner's identification result for the image with image number m is Y, and the RGB statistical mean value R m , G m , B m of the image with image number m obtained through step d) is extracted and assigned to R m-n , G m-n , B m-n;[R t-s ,G t-s ,B t-s ,N], indicates that the s-th employee's identification result of the image with image sequence number t is N, and the RGB statistical mean R t ,G t ,B t is extracted from the image with sequence number t obtained by step d), and is assigned to R t-s ,G t-s ,B t-s .
[0055] Serial number Image serial number Practitioner Identification result RGB 1 1 A Y [[R 1-1 ,G 1-1 ,B 1-1 ,Y]]]> 2 1 B Y [[R 1-2 ,G 1-2 , B 1-2 , Y]]]> 3 1 C N [[R 1-3 , G 1-3 , B 1-3 , N]]]> 4 2 A Y [[R 2-1 , G 2-1 , B 2-1 , Y]]]> 5 3 A Y [[R 3-1 , G 3-1 , B 3-1 , Y]]]> 6 3 D N [[R 3-2 ,G 3-2 ,B 3-2 ,N] <!-- 3 -->]]> … … … … … … t s N [[R t-s ,G t-s ,B t-s ,N]]]> … m n Y [[R m-n , G m-n , B m-n , Y]]]>
[0056] Table 1: Association table of RGB three primary colors and identification results
[0057] f) After the two classification, traverse all the matrices, classify all the matrices by the identification results Y / N, and calculate the threshold values R thod , G thod , B thod of R m-n , G m-n , B m-n , respectively, that is, the mean values of R t-s , G t-s , B t-s in the matrix with identification result Y are calculated, respectively, and the mean values of R thod , G thod , B thod in the matrix with identification result N are calculated, respectively, and the median of the two groups of mean values is obtained to obtain the threshold values R thod , G thod , B thod .
[0058]
[0059]
[0060]
[0061] g) Update and call the plane ratio algorithm for binocular identification:
[0062] Take R thod , G thod , B thod as the calibration value, input the binocular vision color recognition system for identification.
[0063] Update the new threshold value after input,
[0064] Cut the new image obtained in real time,
[0065] Traverse all the pixel points in the cut image, identify the RGB value of each pixel point by binocular vision color recognition,
[0066] The RGB measured value R x , G x , B x of each pixel point is compared with R thod , G thod , B thod respectively, if R x >R thod , G x >G thod , and B x >B thod , the next operation is performed, otherwise the comparison of the next pixel point is skipped;
[0067] The color proportion in the RGB threshold is solved by the cumulative method (pixel point += 1 / total pixel points) to identify the maturity of Chinese wolfberry, that is, the number of pixel points passing through is accumulated, and the initial ratio is obtained by dividing the accumulated pixel point number by the total pixel point number on the image.
[0068] The passing ratio (conventionally 20%) is set, if the initial ratio exceeds the passing ratio, it is identified as mature.
[0069] h) The identification result is transmitted to the arrayed vibration component to perform accurate picking.
[0070] The above is only the preferred embodiment of the present application, it should be noted that for those skilled in the art, without departing from the technical principles of the present application, a number of improvements and modifications can be made, these improvements and modifications should also be considered as the protection scope of the present application.
Claims
1. A binocular color recognition method integrated with a learning mechanism, characterized in that, It comprises the following steps: Determine whether the identification threshold needs to be revised under the new scene, and if not, proceed directly to binocular identification, otherwise enter the threshold revision stage; In the threshold revision stage, CCD calibration collection is carried out; The extracted data is denoised to eliminate image noise background; The processed data is collected for RGB three primary colors and the mean value is calculated; The redundant repetition strategy is issued to the employees for binary classification identification, and the association matrix of image RGB three primary colors and identification results is formed; The isometric method is used to calculate the threshold values of R, G and B; Update and call the plane proportion algorithm for binocular identification; The identification result is transmitted to the arrayed vibration component for accurate picking; The specific steps of forming the association matrix of image RGB three primary colors and identification results include: Send the same image to several employees for identification. If the employee determines that the fruit is ripe through the image, the identification result is output as Y, otherwise as N, and finally the association matrix is obtained; Wherein , indicates the identification result of the nth employee on the image with image sequence number m is Y, and the RGB statistical mean in the image with sequence number m is extracted Assign it to ; , indicates the recognition result of the s-th staff on the image with the image sequence number t is N, and the RGB statistical mean value in the image with the sequence number t is extracted Assign it to ; The process of calculating the threshold values of R, G, B by using the equidistance method , , includes: Classify all matrices through the identification results Y / N; The mean values of the matrixes with the recognition result of Y are calculated respectively The mean values of the matrixes with the recognition result of N are calculated respectively The median values of the two groups of mean values are calculated to obtain the threshold values of R, G and B , , .
2. The binocular color recognition method of claim 1, wherein, The method for determining whether the identification threshold needs to be revised under the new scene is artificial determination or automatic identification by the system.
3. The binocular color recognition method of claim 1, wherein, The specific operation of the CCD calibration collection in the threshold revision stage includes: Image shooting is performed on the target population, T images of the target population are collected, and CCD calibration collection is performed on each image.
4. The binocular color recognition method of claim 3, wherein, The step of collecting RGB three primary colors of the processed data and calculating the mean value includes: Respectively traverse all pixel points in each image, extract RGB three primary colors of each pixel point, count red pixel, green pixel and blue pixel statistics value, and obtain statistical mean value of red pixel, green pixel and blue pixel on each image through formula, wherein the formula is , wherein, represents the R statistical mean in the kth image; represents the G statistical mean in the kth image; represents the B statistical mean in the kth image; represents the R statistical value of the i-th row, j-th column pixel point in the kth image, represents the G statistical value of the i-th row, j-th column pixel point in the kth image, represents the B statistical value of the i-th row, j-th column pixel point in the kth image, .
5. The binocular color recognition method of claim 4, wherein, The step of updating and calling the plane proportion algorithm for binocular identification includes: Update the new threshold after input, Cut the new image obtained in real time, Traverse all pixel points in the cut image, identify the RGB value of each pixel point through binocular vision color, The RGB measured value of each pixel point is compared with , , respectively , , If and and , the next operation is executed, otherwise the comparison of the next pixel point is skipped. Accumulate the number of passing pixel points, divide the accumulated pixel point number by the total pixel points on the image to obtain the initial ratio, Set the passing ratio, if the initial ratio exceeds the passing ratio, identify as mature.
6. The binocular color recognition method of claim 5, wherein, The passing ratio is set to 20%.
Citation Information
Patent Citations
Portable color capture pen
CN106127213A
Robot target recognizing and positioning method based on checkerboard calibration technology
CN107239748A