A jewelry screening method, system, terminal and storage medium

Through machine vision and image recognition technology, jewelry image information is automatically collected and analyzed, and its roundness, defect degree and average diameter are calculated, which solves the problem of low manual screening efficiency and achieves efficient and accurate jewelry screening and quality division.

CN113298862BActive Publication Date: 2025-05-16SHENZHEN ZHONGRUIWEISHI PHOTOELECTRONICS CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110636556.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-08
Publication Date
2025-05-16
Estimated Expiration
2041-06-08

AI Technical Summary

Technical Problem

The existing jewelry screening methods mainly rely on manual labor, which leads to labor-intensive and low screening efficiency.

Method used

Using machine vision and image recognition technology, we use jewelry image information to collect jewelry image information, remove background, calculate roundness, degree of defects and average diameter, and filter and divide quality gradients based on these parameters.

Benefits of technology

It reduces manpower consumption, improves screening efficiency, and can more accurately evaluate the quality of jewelry and perform classification processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113298862B_ABST
    Figure CN113298862B_ABST
Patent Text Reader

Abstract

The present application relates to a jewelry screening method, which includes the following steps: collecting image information of jewelry; removing background and retaining jewelry graphics corresponding to the jewelry; performing screening operations; calculating the roundness of the jewelry graphics and screening based on the roundness; calculating the degree of flaws of the jewelry graphics and screening based on the degree of flaws; calculating the average diameter of the jewelry graphics and screening based on the average diameter; performing quality classification operations; obtaining the set weights of the roundness, degree of flaws and average diameter of the corresponding jewelry graphics; calculating the weighted value based on the roundness, degree of flaws, average diameter and the corresponding set weights of the jewelry graphics; determining the quality gradient corresponding to the current jewelry based on the weighted value. The present application has the effect of reducing manpower consumption to improve screening efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of jewelry processing, and in particular to a jewelry screening method, system, terminal and storage medium. Background Art

[0002] At present, pearls, gemstones and other jewelry need to be screened based on parameters such as roundness, color, and size before being sold. Generally, the rounder the jewelry, the better the color, the fewer flaws, and the larger the size, the higher the price. Therefore, it is necessary to conduct a gradient screening of pearls, gemstones and other jewelry using the above-mentioned various indicators to divide their quality.

[0003] Among them, roundness refers to the degree to which the cross-section of the jewelry is close to the theoretical circle. Its value is the difference between the maximum radius and the minimum radius. When the difference between the maximum radius and the minimum radius is 0, the roundness is 0, and the jewelry is a theoretical circle.

[0004] At present, most manufacturers use manual methods to conduct gradient screening of pearls, gemstones and other jewelry. The people responsible for the selection need to have certain identification capabilities and theoretical foundations to be competent.

[0005] With respect to the above-mentioned related technologies, the inventors believe that there are defects in that the manual selection of pearls, gemstones and other jewelry is labor-intensive and has a relatively low screening efficiency. Summary of the invention

[0006] Firstly, in order to reduce manpower consumption and improve screening efficiency, the present application provides a jewelry screening method.

[0007] The present application provides a jewelry screening method, which adopts the following technical solution:

[0008] A jewelry screening method comprises the following steps:

[0009] Collect image information of jewelry;

[0010] Remove the background and keep the jewelry graphics corresponding to the jewelry;

[0011] Perform filtering operations;

[0012] Calculate the roundness of the jewelry according to its graphics and select according to its roundness;

[0013] Calculate the degree of defects based on the jewelry graphics and select them based on the degree of defects;

[0014] Calculate the average diameter of the jewelry according to the graphics, and select according to the average diameter;

[0015] Perform quality classification operations;

[0016] Get the set weights of the roundness, degree of flaws, and average diameter of the corresponding jewelry graphics;

[0017] Calculate the weighted value based on the roundness, degree of flaws, average diameter and corresponding set weights of the jewelry graphic;

[0018] Determine the quality gradient corresponding to the current jewelry based on the weighted value.

[0019] By adopting the above technical solution, background removal can reduce the number of pixels that need to be processed, reduce the amount of image calculation in the later stage, and improve calculation efficiency; in the jewelry screening operation, it is necessary to calculate the roundness, degree of flaws, and average diameter of the jewelry graphics respectively, so as to facilitate the operator to screen the jewelry according to different classification standards, so as to facilitate the allocation of jewelry processing methods, processing accuracy, uses, etc. according to various properties of jewelry such as roundness, degree of flaws, average diameter, etc.; since the importance of parameters such as roundness, degree of flaws, average diameter to the value of jewelry is different, the weighted value is finally calculated according to the roundness, degree of flaws, average diameter and the corresponding set weights of the jewelry graphics, so as to reasonably determine the quality gradient of the jewelry, and facilitate further classification and processing according to the quality of the jewelry; due to the use of machine vision and image recognition methods, manpower consumption is reduced and screening efficiency is improved.

[0020] Preferably, the step of removing the background comprises:

[0021] Get the set background RGB value corresponding to the current background;

[0022] Determine the color difference threshold according to the background RGB value and the type of jewelry;

[0023] Get the RGB data of each pixel in the current jewelry image information;

[0024] Find the pixel points whose color difference with the set background RGB value exceeds the set color difference threshold, and obtain the jewelry graphic;

[0025] Remove pixels that are not contained within the jewelry graphic.

[0026] By adopting the above technical solution, the shooting background will generally use a color that is significantly different from the color of the jewelry, so as to improve recognition and reduce errors. The color difference threshold is determined by finding the background color and the type of the screened jewelry. The pixel points whose color difference value with the set background RGB value exceeds the set color difference threshold are found to be the pixel points corresponding to the jewelry, thereby obtaining the jewelry graphic and removing the background.

[0027] Preferably, the step of calculating the roundness of the jewelry graphic includes:

[0028] Get the edge pixels of the jewelry graphics;

[0029] Calculate the maximum and minimum widths of the jewelry graphic and find the difference;

[0030] The obtained difference is obtained to calculate the roundness of the jewelry shape.

[0031] By adopting the above technical solution, the roundness can be calculated by the maximum width and the minimum width, so that the roundness of the jewelry can be measured. The higher the roundness, the higher the value of the jewelry, and the more refined the processing steps required, which facilitates screening.

[0032] Preferably, the step of calculating the degree of defects of the jewelry graphic includes:

[0033] Get the RGB data of the jewelry graphic;

[0034] Divide the jewelry graphic into a central area and a ring area, wherein there are multiple ring areas and they are all distributed around the central area;

[0035] Get the average color value of the central area and the annular area respectively;

[0036] Find the pixel points located in the central area and whose color difference with the average color value of the central area is greater than the set value;

[0037] Find the pixel points located in the annular area and whose color difference with the average color value of the annular area is greater than the set value;

[0038] Calculate the number of pixels that meet the conditions and the color difference value corresponding to each pixel;

[0039] The degree of defect is calculated based on the number of pixels and the color difference value corresponding to each pixel.

[0040] By adopting the above technical solution, since pearls and other jewelry are spherical, the side close to the CCD camera and other shooting equipment, that is, the central area is brighter; in contrast, since the slope of the tangent of the annular area outside the central area with the horizontal plane increases, its equivalent reflective area is reduced, so its color value presented on the jewelry graphic gradually decreases with the increase of the slope, that is, the farther the annular area is from the shooting equipment, the lower the color value is, so the central area and the annular area are divided, and then the pixel points with different color values, that is, defective points, are found by comparing the color difference values, and the degree of defect of the jewelry is determined according to the number of defective points and the color difference value between each defective point and the average color value of the central area or the annular area where it is located.

[0041] Preferably, before performing the quality classification operation, the following steps are also included:

[0042] Convert the RGB data of jewelry graphics into HSV model;

[0043] Get the baseline HSV model;

[0044] Compare the similarity between the HSV model of the current jewelry graphic and the benchmark HSV model;

[0045] The color gradient of the current jewelry is divided according to the obtained similarity.

[0046] By adopting the above technical solution, the parameters of associated colors in the HSV model include hue, saturation and brightness. By comparing the similarity between the HSV model of the current jewelry graphic and the benchmark HSV model, the color gradient of the jewelry can be obtained. The higher the similarity, the better the color and the higher the value.

[0047] Preferably, the jewelry image information includes a first jewelry image and a second jewelry image, and the step of calculating the degree of defect of the jewelry image further includes:

[0048] Acquire a first jewelry image of a single side of the jewelry;

[0049] Acquire a jewelry graphic of the first jewelry image, and acquire an outline of the jewelry graphic as a selected outline;

[0050] Calculate the mirror image of the selected contour;

[0051] Acquire a second image of the jewelry from another side of the jewelry;

[0052] Selecting a jewelry graphic in the second jewelry image according to the mirror image of the jewelry graphic;

[0053] The overall defect degree of the jewelry is calculated according to the jewelry pattern of the first jewelry image and the jewelry pattern of the second jewelry image.

[0054] By adopting the above technical solution, since the jewelry is spherical, when both sides of the jewelry are photographed, the first jewelry image obtained is mirror-symmetrical to the second jewelry image. Therefore, the jewelry graphic in the second jewelry image can be directly selected based on the mirror image of the jewelry graphic, thereby reducing the amount of calculation for removing the background and improving processing efficiency.

[0055] Preferably, the step of calculating the average diameter of the jewelry pattern includes:

[0056] Get the edge pixels of the jewelry graphics;

[0057] Calculate the center of the jewelry graphic based on multiple edge pixel points;

[0058] Calculate the distances from multiple edge pixels of the jewelry graphic to the center of the circle and take the average value;

[0059] Calculate the average diameter of the jewelry shape based on the average value.

[0060] By adopting the above technical solution, the average diameter of the jewelry graphic is calculated by the distance from multiple groups of edge pixels to the center of the circle. The average diameter can reflect the approximate size of the jewelry, which makes it convenient to classify the size of the jewelry, so that different jewelry can be used for different purposes and improve applicability.

[0061] Secondly, in order to reduce manpower consumption and improve screening efficiency, the present application provides a jewelry screening system, which adopts the following technical solutions:

[0062] A jewelry screening system, comprising:

[0063] An image acquisition module, used to collect image information of jewelry;

[0064] A background removal module, connected to the image acquisition module, for removing the background and retaining the jewelry graphics corresponding to the jewelry;

[0065] A screening module, connected to the background removal module, for performing a screening operation;

[0066] The quality classification module is connected to the screening module and is used to perform the quality classification operation, obtain the set weights of the roundness, defect degree, and average diameter of the corresponding jewelry graphic, calculate the weighted value according to the roundness, defect degree, average diameter of the jewelry graphic and the corresponding set weights, and determine the quality gradient corresponding to the current jewelry according to the weighted value;

[0067] The screening modules include:

[0068] The roundness calculation module is used to calculate the roundness of the jewelry according to the jewelry graphics and to screen according to the roundness;

[0069] A defect degree calculation module is used to calculate the defect degree of the jewelry according to the jewelry graphics and to screen the jewelry according to the defect degree;

[0070] The average diameter calculation module is used to calculate the average diameter of jewelry graphics and filter based on the average diameter.

[0071] By adopting the above technical solution, the background removal module can reduce the pixels of the corresponding background, reduce the pixels that need to be processed, reduce the amount of image calculation, and improve the calculation efficiency; the roundness calculation module, the defect degree calculation module and the average diameter calculation module respectively calculate the roundness, defect degree and average diameter of the jewelry graphics, so as to facilitate the operator to screen the jewelry according to different classification standards, so as to facilitate the allocation of jewelry processing methods, processing accuracy, uses, etc. according to various properties of jewelry such as roundness, defect degree, average diameter, etc.; since the importance of parameters such as roundness, defect degree, average diameter to the value of jewelry is different, the quality classification module is finally used to calculate the weighted value according to the roundness, defect degree, average diameter and the corresponding set weights of the jewelry graphics, so as to reasonably determine the quality gradient of the jewelry, and facilitate further classification and processing according to the quality of the jewelry; since the method of machine vision and image recognition is adopted, the manpower consumption is reduced and the screening efficiency is improved.

[0072] Thirdly, in order to reduce manpower consumption and improve screening efficiency, the present application provides an intelligent terminal, which adopts the following technical solution: an intelligent terminal includes a memory and a processor, and the memory stores a computer program that can be loaded by the processor and execute the above-mentioned jewelry screening method.

[0073] Fourthly, in order to reduce manpower consumption and improve screening efficiency, the present application provides a computer-readable storage medium, which adopts the following technical solution: a computer-readable storage medium stores a computer program that can be loaded by a processor and execute any of the above-mentioned jewelry screening methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0074] Figure 1 is a system module diagram of a jewelry screening system according to an embodiment of the present application;

[0075] Figure 2 is a method flow chart of the jewelry screening method of an embodiment of the present application;

[0076] Figure 3 It is a partial method flow chart of the jewelry screening method of the embodiment of the present application, mainly showing the background removal step;

[0077] Figure 4 It is a partial method flow chart of the jewelry screening method of the embodiment of the present application, which mainly shows the steps of the screening operation;

[0078] Figure 5 This is a partial method flow chart of the jewelry screening method according to an embodiment of the present application, which mainly shows the steps for calculating the overall defect degree of the jewelry.

[0079] Explanation of the accompanying drawings: 1. Image acquisition module; 2. Background removal module; 3. Screening module; 31. Roundness calculation module; 32. Defect degree calculation module; 33. Average diameter calculation module; 34. Color gradient division module; 4. Quality division module. DETAILED DESCRIPTION

[0080] The present application is further described in detail below in conjunction with all the accompanying drawings.

[0081] The present application embodiment discloses a jewelry screening system and method. Figure 1 The jewelry screening system includes an image acquisition module 1, a background removal module 2, a screening module 3 and a quality classification module 4. The screening module 3 includes a roundness calculation module 31, a defect degree calculation module 32, an average diameter calculation module 33 and a color gradient classification module 34. The image acquisition module 1, the background removal module 2, the screening module 3, the quality classification module 4 and the screening module 3 can all use a processor.

[0082] The image acquisition module 1 is used to acquire the image information of the jewelry, the background removal module 2 is used to remove the pixels corresponding to the background in the image information and retain the jewelry graphics, the roundness calculation module 31, the defect degree calculation module 32 and the average diameter calculation module 33 are used to respectively calculate the roundness, defect degree and average diameter of the jewelry graphics, and the color gradient division module 34 is used to divide the color of the jewelry to facilitate individual screening, and the quality classification module 4 is used to classify the quality of the jewelry according to the roundness, defect degree and average diameter of the jewelry graphics, thereby improving the screening efficiency.

[0083] Reference Figure 1 , Figure 2 , the above-mentioned jewelry screening system is applied to implement the following jewelry screening method, the specific steps of which include:

[0084] S100, the image acquisition module 1 collects image information of jewelry.

[0085] Specifically, the jewelry can be photographed and imported through an industrial CCD camera, and fill light can be used to increase the ambient brightness and reduce the impact of shadows on the true color of the jewelry and the background.

[0086] S200, background removal module 2 removes the background and retains the jewelry graphics corresponding to the jewelry. Removing the background can reduce the number of pixels to be processed, reduce the amount of image calculation in the later stage, and improve the calculation efficiency.

[0087] S210, refer to Figure 3 , get the set background RGB value corresponding to the current background.

[0088] Specifically, the background is generally selected to have a color that is quite different from the color of the jewelry. For example, when the pearls are milky white, a green background can be used and its RGB data can be read, for example (0, 255, 0).

[0089] S220, determining a color difference threshold according to the set background RGB value and the type of jewelry.

[0090] Specifically, since the background and the type of the selected jewelry may change, a color difference threshold can be set to distinguish the background from the jewelry, and different jewelry types and background combinations correspond to different color difference thresholds.

[0091] S230, obtaining RGB data of each pixel in the image information of the current jewelry.

[0092] Specifically, pearls and other jewelry have individual differences, so different positions may show different colors. The CCD camera presents the colors of different positions on the pearl through pixels, making it easier to identify.

[0093] S240, searching for pixels whose color difference with the set background RGB value exceeds the set color difference threshold, obtaining a jewelry graphic, and removing pixels not included in the jewelry graphic.

[0094] Specifically, the color difference threshold is set to reflect the minimum color difference between the background and the jewelry. When the color difference between any pixel and the set background RGB value is higher than the set color difference threshold, the non-background part of the pixel needs to be retained, and multiple retained pixels can form a closed graph, namely the jewelry graph. Correspondingly, the pixels not included in the jewelry graph need to be deleted, thereby reducing the amount of image calculation in the later stage and improving calculation efficiency.

[0095] S300, refer to Figure 2 , Figure 4 , Screening module 3 (see Figure 1 ) performs filtering operations, including the calculation of the roundness of the jewelry graphics, the calculation of the degree of flaws of the jewelry graphics, the calculation of the average diameter of the jewelry graphics, and the division of the color gradient of the jewelry graphics.

[0096] S310, roundness calculation module 31 (see Figure 1 ) Calculate the roundness of the jewelry according to the jewelry graphics, and select according to the roundness. This step is specifically divided into:

[0097] S311, obtaining edge pixel points of the jewelry graphic.

[0098] Specifically, the edge pixels are selected from non-background pixels adjacent to the pixels determined to be the background part.

[0099] S312, calculating the maximum width and the minimum width of the jewelry graphic and finding the difference.

[0100] Specifically, any edge pixel point is selected and its distance to other edge pixel points is calculated, then all edge pixel points of the jewelry graphic are traversed, and the distances to other edge pixel points are calculated respectively, and the maximum value and the minimum value are selected as the maximum width and the minimum width.

[0101] S313, obtaining the difference and calculating the roundness of the jewelry graphic.

[0102] Specifically, roundness = maximum width - minimum width. This formula is used to calculate the roundness of jewelry graphics, and the jewelry is divided and screened based on the roundness value.

[0103] S320, average diameter calculation module 33 (see Figure 1 ) Calculate the average diameter of the jewelry graphics and select based on the average diameter. The steps to obtain the average diameter are:

[0104] S321, obtaining edge pixel points of the jewelry graphic, and calculating the center of the jewelry graphic based on the plurality of edge pixel points.

[0105] Specifically, the center of the circle can be the center of a circle whose diameter is the maximum width of the jewelry graphic.

[0106] S322, calculating the distances from a plurality of edge pixel points of the jewelry graphic to the center of the circle and taking an average value, and then calculating the average diameter of the jewelry graphic based on the average value.

[0107] Specifically, since pearls and other jewellery are mostly naturally formed, they may be oval, elliptical or irregular in shape. Therefore, the approximate size of the jewellery can be reflected by the average diameter, which makes it easier for manufacturers to classify the jewellery. For example, small pearls can be used to grind pearl powder, medium-sized pearls can be used to decorate clothes, and large pearls can be used as pendants.

[0108] S330, color gradient division module 34 (see Figure 1 ) Divide the color gradient according to the jewelry graphics, and screen according to its color gradient. The division of color gradient includes the following steps:

[0109] S331, converting the RGB data of the jewelry graphic into an HSV model.

[0110] Specifically, HSV is a relatively intuitive color model, so it is widely used in many image editing tools. The color parameters in this model are: hue, saturation and brightness. In this embodiment, openCV software or photoshop software can be used to convert RGB data into an HSV model.

[0111] S332, obtaining a benchmark HSV model.

[0112] S333, comparing the similarity between the HSV model of the current jewelry graphic and the benchmark HSV model.

[0113] Specifically, the benchmark HSV model is the preset highest standard model, which can reflect the best quality of the current jewelry. By comparing the similarity between the HSV model of the current jewelry graphic and the benchmark HSV model, the color of the current jewelry can be reflected to the greatest extent through the similarity.

[0114] S334, dividing the color gradient of the current jewelry according to the obtained similarity.

[0115] The jewelry is divided into a plurality of color gradients according to the obtained similarity, so that it is convenient for operators to select jewelry of different colors according to the color gradients for different purposes.

[0116] S340, defect degree calculation module 32 (see Figure 1 ) Calculate the degree of defects based on the jewelry graphics, and screen according to the degree of defects. The steps for obtaining the degree of defects of jewelry graphics are as follows:

[0117] S341, obtaining RGB data of the jewelry graphic, specifically, the RGB value corresponding to each pixel of the jewelry graphic.

[0118] S342, dividing the jewelry graphic into a central area and a ring area, wherein there are multiple ring areas and they are all distributed around the central area.

[0119] Specifically, since pearls and other jewelry are spherical, the side close to the CCD camera and other shooting equipment, that is, the central area, is brighter; in contrast, since the slope of the tangent of the annular area outside the central area and the horizontal plane increases, the equivalent reflective area is reduced, so the color value presented on the jewelry graphic gradually decreases as the slope increases, that is, the farther the annular area is from the shooting equipment, the lower the color value. Therefore, in order to avoid abnormal color difference in the jewelry graphic, it is necessary to divide the central area and the annular area. The width of the division of the central area and the annular area can be determined based on experimental results. For example, the central area selects a circular area with a radius of 2mm, and the annular area selects a circular ring with a width of 1.5mm. Each annular area expands outward in turn to form multiple concentric rings. In addition, the equivalent reflective area in the central area and each annular area is close, so the color difference offset is small, so the pixel points in the same central area or the same annular area can be compared with each other.

[0120] S343, respectively obtaining the average color values ​​of the central area and the annular area.

[0121] Specifically, since the color difference offset in the same central area or the same annular area is small, the average color value of the pixels in the central area and the average color value of the pixels in each annular area can be taken as the reference color value.

[0122] S344, searching for pixels located in the central area and whose color difference value between the color value and the average color value of the central area is greater than a set value; searching for pixels located in the annular area and whose color difference value between the color value and the average color value of the annular area is greater than a set value.

[0123] Specifically, the pixels that meet the conditions in the central area and the annular area, that is, the pixels whose color difference between their respective areas and the average color value of the area is greater than the set value, are defective points. The set value is the minimum color difference value that distinguishes defective points from normal pixels, so as to select defective points.

[0124] S345, calculating the number of pixels that meet the conditions and the color difference values ​​corresponding to each pixel, and then calculating the degree of defect according to the number of pixels and the color difference values.

[0125] Specifically, the qualified pixels and defect points can reflect the degree of defects on the jewelry surface according to the number of defect points and their corresponding color difference values. The more defect points there are and the larger the color difference value is, the higher the degree of defects is and the worse the quality of the jewelry is. The specific quantitative standard can be processed using a weighted algorithm, that is, the number of defect points and their corresponding color difference values ​​are calculated using different weights to obtain the corresponding value of the degree of defects.

[0126] Reference Figure 2 , Figure 5 Since the jewelry image shot from one side cannot fully reflect the overall defect level of the jewelry, the jewelry image information is divided into the first jewelry image and the second jewelry image, and then the defect level is calculated. The specific steps are as follows:

[0127] First, obtain a first jewelry image of one side of the jewelry.

[0128] Then, according to steps S100 and S200, a jewelry pattern is obtained after the background is removed from the first jewelry image. At this time, edge pixel points of the jewelry pattern are obtained, and a closed curve obtained by fitting the edge pixel points is used as the contour of the jewelry pattern, that is, the selected contour.

[0129] Then, a mirror image of the selected outline is calculated, and the mirror image is mirror-symmetrical to the jewelry image corresponding to the first jewelry image.

[0130] Then, a second jewelry image of the other side of the jewelry is obtained. Since the shooting positions are relative, the outline of the jewelry pattern in the second jewelry image is consistent with the outline of the mirror image pattern.

[0131] Then, the jewelry graphic in the second jewelry image is selected according to the mirror image of the jewelry graphic. At this time, the step of removing the background can be omitted, and the pixel points of the specified area can be directly obtained, thereby reducing the calculation amount of removing the background and improving the processing efficiency.

[0132] Then, the overall defect degree of the jewelry is calculated based on the jewelry graphics of the first jewelry image and the jewelry graphics of the second jewelry image. For specific steps, refer to steps S341-S345. The final defect degree can be determined by averaging.

[0133] S400, quality classification module 4 (see Figure 1 ) performs quality classification operations to obtain the set weights of the roundness, degree of flaws, average diameter, and color gradient of the corresponding jewelry graphics.

[0134] Specifically, for example, the roundness is a1, and the corresponding weight is c1; the degree of defect is a2, and the corresponding weight is c2; the average diameter is a3, and the corresponding weight is c3; the color gradient is divided into multiple gradients, and each gradient corresponds to a different basic value, such as the basic value b1.

[0135] S410, calculating a weighted value according to the roundness, defect degree, average diameter and corresponding set weights of the jewelry graphic.

[0136] Specifically, weighted value = a1*c1+a2*c2+a3*a3+b1, and multiple continuous weighted value ranges are set as quality gradients.

[0137] S420, determining the quality gradient corresponding to the current jewelry according to the weighted value.

[0138] Finally, the quality gradient is divided according to the weighted value range into which the calculated weighted value falls, so as to facilitate the screening of jewelry.

[0139] This embodiment also provides an intelligent terminal, including a memory and a processor, the processor can be a central processing unit such as a CPU or an MPU or a host system built with the CPU or the MPU as the core, and the memory can be a storage device such as a RAM, a ROM, an EPROM, an EEPROM, a FLASH, a disk, an optical disk, etc. The memory stores a computer program that can be loaded by the processor and execute the above-mentioned jewelry screening method.

[0140] This embodiment also provides a computer-readable storage medium, which can be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc., which can store program codes. The computer-readable storage medium stores a computer program that can be loaded by a processor and execute the above-mentioned jewelry screening method.

[0141] The implementation principle of a jewelry screening method in the embodiment of the present application is as follows: the image acquisition module 1 first collects the image information of the jewelry, and then the background removal module 2 removes the background and retains the jewelry graphics. Then the roundness calculation module 31 calculates the roundness according to the jewelry graphics, the defect degree calculation module 32 calculates the defect degree according to the jewelry graphics, the average diameter calculation module 33 calculates the average diameter according to the jewelry graphics, and the color gradient module divides the color gradient according to the jewelry graphics. After the roundness, defect degree, average diameter and color gradient of the jewelry graphics are obtained, an integrated calculation is performed, and the quality classification module 4 calculates the weighted value of the jewelry according to the weighted algorithm, thereby dividing its quality gradient, which reduces the manpower consumption and improves the screening efficiency.

[0142] The above are all preferred embodiments of the present application, and the protection scope of the present application is not limited thereto. Therefore, any equivalent changes made according to the structure, shape, and principle of the present application should be included in the protection scope of the present application.

Claims

1. A jewelry screening method, characterized in that: The following steps are included: Collect image information of jewelry; Remove the background and keep the jewelry graphics corresponding to the jewelry; Perform filtering operations; Calculate the roundness of the jewelry according to its graphics and select according to its roundness; Calculate the degree of defects based on the jewelry graphics and select them based on the degree of defects; Calculate the average diameter of the jewelry according to the graphics, and select according to the average diameter; Perform quality classification operations; Get the set weights of the roundness, degree of flaws, and average diameter of the corresponding jewelry graphics; Calculate the weighted value based on the roundness, degree of flaws, average diameter and corresponding set weights of the jewelry graphic; Determine the quality gradient corresponding to the current jewelry based on the weighted value; The step of calculating the degree of defects of the jewelry pattern includes: Get the RGB data of the jewelry graphic; Divide the jewelry graphic into a central area and a ring area, wherein there are multiple ring areas and they are all distributed around the central area; Get the average color value of the central area and the annular area respectively; Find the pixel points located in the central area and whose color difference with the average color value of the central area is greater than the set value; Find the pixel points located in the annular area and whose color difference with the average color value of the annular area is greater than the set value; Calculate the number of pixels that meet the conditions and the color difference value corresponding to each pixel; The degree of defect is calculated based on the number of pixels and the color difference value corresponding to each pixel.

2. The jewelry screening method according to claim 1, characterized in that: The step of removing the background comprises: Get the set background RGB value corresponding to the current background; Determine the color difference threshold according to the background RGB value and the type of jewelry; Get the RGB data of each pixel in the current jewelry image information; Find the pixel points whose color difference with the set background RGB value exceeds the set color difference threshold, and obtain the jewelry graphic; Remove pixels that are not contained within the jewelry graphic.

3. The jewelry screening method according to claim 1, characterized in that: The step of calculating the roundness of the jewelry pattern includes: Get the edge pixels of the jewelry graphics; Calculate the maximum and minimum widths of the jewelry graphic and find the difference; The obtained difference is obtained to calculate the roundness of the jewelry shape.

4. The jewelry screening method according to claim 1, characterized in that: Before performing the quality division operation, the following steps are also included: Convert the RGB data of jewelry graphics into HSV model; Get the baseline HSV model; Compare the similarity between the HSV model of the current jewelry graphic and the benchmark HSV model; The color gradient of the current jewelry is divided according to the obtained similarity.

5. The jewelry screening method according to claim 1, characterized in that: The jewelry image information includes a first jewelry image and a second jewelry image, and the step of calculating the degree of defect of the jewelry image also includes: Acquire a first jewelry image of a single side of the jewelry; Acquire a jewelry graphic of the first jewelry image, and acquire an outline of the jewelry graphic as a selected outline; Calculate the mirror image of the selected contour; Acquire a second image of the jewelry from another side of the jewelry; Selecting a jewelry graphic in the second jewelry image according to the mirror image of the jewelry graphic; The overall defect degree of the jewelry is calculated according to the jewelry pattern of the first jewelry image and the jewelry pattern of the second jewelry image.

6. The jewelry screening method according to claim 1, characterized in that: The step of calculating the average diameter of the jewelry pattern includes: Get the edge pixels of the jewelry graphics; Calculate the center of the jewelry graphic based on multiple edge pixel points; Calculate the distances from multiple edge pixels of the jewelry graphic to the center of the circle and take the average value; Calculate the average diameter of the jewelry shape based on the average value.

7. A jewelry screening system, characterized in that: include, An image acquisition module (1) is used to collect image information of jewelry; A background removal module (2) is connected to the image acquisition module (1) and is used to remove the background and retain the jewelry graphics corresponding to the jewelry; A screening module (3), connected to the background removal module (2), for performing a screening operation; The quality classification module (4) is connected to the screening module (3) and is used to perform a quality classification operation, obtain the set weights of the roundness, defect degree, and average diameter of the corresponding jewelry graphic, calculate the weighted value according to the roundness, defect degree, average diameter of the jewelry graphic and the corresponding set weights, and determine the quality gradient corresponding to the current jewelry according to the weighted value; The screening module (3) includes, A roundness calculation module (31) is used to calculate the roundness of the jewelry according to the jewelry graphics and to screen the jewelry according to the roundness; A defect degree calculation module (32) is used to calculate the defect degree of the jewelry according to the jewelry graphics, and to screen the jewelry according to the defect degree; The calculation of the degree of defects based on the jewelry pattern includes: Get the RGB data of the jewelry graphic; Divide the jewelry graphic into a central area and a ring area, wherein there are multiple ring areas and they are all distributed around the central area; Get the average color value of the central area and the annular area respectively; Find the pixel points located in the central area and whose color difference with the average color value of the central area is greater than the set value; Find the pixel points located in the annular area and whose color difference with the average color value of the annular area is greater than the set value; Calculate the number of pixels that meet the conditions and the color difference value corresponding to each pixel; Calculate the degree of defect based on the number of pixels and the color difference value corresponding to each pixel The average diameter calculation module (33) is used to calculate the average diameter of the jewelry graphics and to perform screening based on the average diameter.

8. An intelligent terminal, characterized in that: The method comprises a memory and a processor, wherein the memory stores a computer program that can be loaded by the processor and execute the jewelry screening method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that: A computer program is stored which can be loaded by a processor and execute the jewelry screening method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Embedded type automatic pearl sorting device and method based on image recognition

    CN105195438A

  • Pearl finish grade detection method and system

    CN110766683A