Mobile phone hinge appearance quality detection method and system based on machine vision
By eliminating reflective interference in the grayscale histogram and calculating neighborhood contrast for clustering adjustment, detailed texture enhancement of mobile phone hinge images is achieved, solving the texture blurring problem in traditional methods and improving detection accuracy.
Patent Information
- Application Number
- CN202510862081.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-25
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2045-06-25
AI Technical Summary
Traditional histogram equalization methods are difficult to effectively enhance the texture details when processing mobile phone hinge images, resulting in some texture details becoming blurred or disappearing, which affects the detection accuracy.
By acquiring the grayscale histogram of the phone hinge image, eliminating interference from reflective grayscale enhancement, calculating neighborhood contrast for clustering, adjusting the length of each sub-interval, and performing histogram equalization, the texture of the image with low contrast is enhanced.
It improves image enhancement, ensures clear rendering of textures at all levels, and assists in hinge defect detection.
Smart Images

Figure CN120563485B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image processing. More particularly, the present application relates to a machine vision-based mobile phone hinge appearance quality detection method and system. BACKGROUND
[0002] In modern manufacturing, as a key component for realizing the folding function of mobile phones, the appearance quality of mobile phone hinges directly affects the overall quality and user experience of mobile phones. With the growing demand for foldable screen mobile phones in the market, there is a higher demand for the efficiency and accuracy of mobile phone hinge appearance quality detection. Machine vision technology has been widely used in mobile phone hinge appearance quality detection due to its high precision, high speed, and non-contact detection advantages.
[0003] In the machine vision detection process, image enhancement is an important step to improve detection accuracy. The traditional histogram equalization method is based on gray scale statistics. By transforming the image gray scale histogram, the original image gray scale distribution is expanded to the entire sub-interval to enhance the global contrast of the image. However, this method has significant limitations when processing mobile phone hinge images. Since traditional histogram equalization is a global transformation based on the overall gray scale distribution of the image, it lacks the ability to adaptively adjust local region features. When faced with the rich and complex detail texture on the surface of the mobile phone hinge, this "one-size-fits-all" gray scale mapping method cannot effectively enhance the fine texture. During the gray level redistribution process, on the one hand, some detail textures cannot be effectively highlighted during global gray scale stretching due to small gray level differences, resulting in weak enhancement effect. On the other hand, some key texture details similar to the background gray scale may be smoothed or removed due to gray level merging. Taking the functional texture commonly found on the surface of mobile phone hinges as an example, these textures often carry key information about the hinge opening and closing motion, and subtle wear, deformation, or abnormalities can affect the normal use of the hinge. However, after traditional histogram equalization processing, these textures may be over-smoothed due to similar gray scale distribution characteristics to the surrounding area, making the originally clear texture edges blurred, and even some texture details completely disappear.
[0004] In view of the complexity of mobile phone hinge appearance and the richness of detail texture, it is an urgent need to develop more accurate and efficient image enhancement methods and supporting detection systems to improve the level of mobile phone hinge automation detection and ensure the quality of mobile phone products, breaking through the technical bottleneck of traditional histogram equalization methods in detail texture enhancement. SUMMARY
[0005] To solve the problem of how to enhance the enhancement of detail texture, the present application proposes a machine vision-based mobile phone hinge appearance quality detection method and system.
[0006] In a first aspect, the present application provides a mobile phone hinge appearance quality detection method based on machine vision, comprising:
[0007] obtaining a mobile phone hinge image;
[0008] statistically obtaining a gray level histogram of the mobile phone hinge image, obtaining a reflection gray level promotion amount, and excluding the reflection gray level promotion amount interference in the gray level histogram to obtain an adjusted overall interval;
[0009] calculating the neighborhood contrast of each gray level in the gray level histogram, clustering all the gray levels of the gray level histogram according to the neighborhood contrast to obtain a plurality of subintervals, adjusting the proportion of the neighborhood contrast of the gray levels in each subinterval to the adjusted overall interval to obtain an adjusted length of each subinterval, wherein the adjusted length is negatively correlated with the neighborhood contrast of the gray levels in each subinterval and positively correlated with the proportion of the subinterval to the adjusted overall interval;
[0010] dividing the adjusted overall interval according to the adjusted length of each subinterval to obtain an adjusted interval of each subinterval, taking the adjusted interval of each subinterval as the equalized value interval of each subinterval, and performing histogram equalization processing on each subinterval in the gray level histogram to obtain an enhanced mobile phone hinge image, thereby assisting in mobile phone hinge defect detection.
[0011] The present application removes the influence of the virtual high gray value caused by reflection on image quality by excluding the reflection gray level promotion amount in the gray level histogram, thereby improving the enhancement effect. Further, by analyzing the contrast of each subinterval in the histogram, an appropriate adjusted length is set for each subinterval, so that the subintervals with low contrast have stronger enhancement effect, and the subintervals with high contrast have weaker enhancement effect, thereby allowing the textures of all levels to be better presented.
[0012] Preferably, the gray level histogram obtained by statistically processing the mobile phone hinge image comprises:
[0013] taking each gray value of the mobile phone hinge image as a gray level, obtaining the pixel number of each gray level, taking the gray level as the horizontal axis and the pixel number corresponding to each gray level as the vertical axis, and drawing a histogram.
[0014] Preferably, the reflection gray level promotion amount is obtained by:
[0015] performing superpixel segmentation on the mobile phone hinge image to obtain a plurality of superpixel regions;
[0016] obtaining the superpixel region with the maximum gray value as the analysis reflection region;
[0017] obtaining the similarity between the analysis reflection region and other superpixel regions, and screening out the superpixel region with a similarity greater than a preset similarity threshold as a reference region of the analysis reflection region.
[0018] Obtaining the mean value of the reference region, and taking the minimum value of the mean values of all the reference regions as a reference value;
[0019] Taking the difference between the mean value of the reflective region and the reference value as the reflective gray scale increase.
[0020] The present application considers that similar components are affected differently by reflection in different regions, accurately screens the regions less disturbed by light to represent the gray scale value without reflective disturbance, and further accurately calculates the gray scale increase caused by reflection, thereby providing a basis for subsequent reduction of reflective disturbance.
[0021] Preferably, the similarity between the reflective region and other super-pixel regions is obtained by analyzing the similarity between the reflective region and other super-pixel regions, comprising:
[0022] Obtaining the edge of the reflective region, and statistically obtaining the curvature histogram of the reflective region by analyzing the curvature of all pixels on the edge of the reflective region; and statistically obtaining the gray scale histogram of the reflective region by analyzing the gray scale value of the reflective region;
[0023] Obtaining the curvature histogram and the gray scale histogram of each super-pixel region;
[0024] Adding the cosine similarity of the curvature histogram and the cosine similarity of the gray scale histogram to obtain the similarity between the reflective region and other super-pixel regions.
[0025] The present application comprehensively and accurately measures the similarity between two regions by curvature and gray scale, thereby providing a basis for subsequent accurate screening and analysis of the same components as the reflective region.
[0026] Preferably, the adjusted overall interval is obtained by excluding the reflective gray scale increase interference in the gray scale histogram, comprising:
[0027] Obtaining the maximum value of the gray scale in the gray scale histogram, and taking the difference between the maximum value of the gray scale and the reflective gray scale increase as an upper limit value, and taking 0 as a lower limit value;
[0028] Taking the value interval between the lower limit value and the upper limit value as the adjusted overall interval.
[0029] The present application removes the virtual high gray scale value caused by reflection by subtracting the reflective gray scale increase from the upper limit value, thereby providing a basis for subsequent reduction of the influence of reflection on image quality.
[0030] Preferably, the neighborhood contrast of each gray scale in the gray scale histogram is calculated by calculating the neighborhood contrast of each gray scale in the gray scale histogram, comprising:
[0031] Taking the difference between the mean value of the gray scale of each super-pixel region and the mean value of the gray scale of the adjacent super-pixel region as the contrast of each super-pixel region.
[0032] The contrast of the superpixel region where each pixel in each gray level is located is obtained, and the average of the contrast of the superpixel region where all pixels in each gray level are located is taken as the neighborhood contrast of each gray level.
[0033] The present application accurately reflects the clearness of the boundary texture between structures by analyzing the contrast between superpixel regions, thereby providing a basis for subsequent image enhancement according to the contrast.
[0034] Preferably, the adjusting the proportion of the neighborhood contrast of the gray level in each subinterval in the adjusted overall interval to obtain the adjusted length of each subinterval comprises:
[0035] ;
[0036] wherein, 、 denote the length of the i-th subinterval and the j-th subinterval, respectively, denote the average of the neighborhood contrast of all gray levels in the i-th subinterval, denote the average of the neighborhood contrast of all gray levels in the j-th subinterval, denote the length of the adjusted overall interval, denote the adjusted length of the i-th subinterval, denote the upward rounding symbol.
[0037] Preferably, the histogram equalization processing of each subinterval in the gray histogram to obtain the enhanced mobile phone hinge image comprises:
[0038] The adjusted interval of each subinterval is taken as the mapped value interval of each subinterval, and the histogram in each subinterval is taken as an independent histogram, and the histogram equalization processing of each subinterval in the gray histogram is performed based on the mapped value interval of each subinterval to obtain the enhanced mobile phone hinge image.
[0039] Preferably, the auxiliary mobile phone hinge defect detection comprises:
[0040] Constructing a defect detection network;
[0041] Inputting the enhanced mobile phone hinge image into the defect detection network to obtain the defect region in the mobile phone hinge.
[0042] In a second aspect, the present application provides a mobile phone hinge appearance quality detection system based on machine vision, comprising: a processor and a memory, the memory stores computer program instructions, when the computer program instructions are executed by the processor, the above-mentioned mobile phone hinge appearance quality detection method based on machine vision is realized.
[0043] By adopting the technical scheme, the machine vision-based mobile phone hinge appearance quality detection method is generated into a computer program and stored in a memory to be loaded and executed by a processor, so that a terminal device is manufactured according to the memory and the processor, and use is facilitated.
[0044] The present application has the following advantages:
[0045] The present application removes the influence of the false high gray value caused by the reflection on the image quality by excluding the reflection gray level improvement in the gray histogram, and improves the enhancement effect.
[0046] Further, by analyzing the contrast of each sub-interval in the histogram, the appropriate adjusted length is set for each sub-interval, so that the low contrast has a stronger enhancement effect, and the high contrast has a weaker enhancement effect, so that the textures of all levels can be better presented. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 is a step flow chart of the machine vision-based mobile phone hinge appearance quality detection method according to an embodiment of the present application;
[0048] Figure 2 is a mobile phone hinge image provided by the embodiment of the present application.
[0049] Figure 3 is an enhanced mobile phone hinge image provided by the embodiment of the present application. DETAILED DESCRIPTION
[0050] Please refer to Figure 1 which shows a step flow chart of the machine vision-based mobile phone hinge appearance quality detection method according to an embodiment of the present application, and the method comprises the following steps:
[0051] S1: Obtain a mobile phone hinge image.
[0052] Preferably, as an example, the mobile phone hinge image is obtained, comprising:
[0053] Place the mobile phone hinge directly below the camera and collect the mobile phone hinge image.
[0054] Perform gray scale processing on the mobile phone hinge image to obtain a gray scale image of the mobile phone hinge image. For ease of description, the gray scale image of the mobile phone hinge image is still referred to as the mobile phone hinge image hereinafter. Figure 2 The mobile phone hinge image is displayed.
[0055] S2: Perform statistics on the mobile phone hinge image to obtain a gray histogram, obtain a reflection gray level improvement, and exclude the interference of the reflection gray level improvement in the gray histogram to obtain an adjusted overall interval.
[0056] S20: Obtain a gray scale histogram by counting the mobile phone hinge image.
[0057] Preferably, as an example, obtaining a gray scale histogram by counting the mobile phone hinge image comprises:
[0058] Taking the gray scale value of each value in the mobile phone hinge image as a gray scale level, obtaining the pixel number of each gray scale level, taking the gray scale level as the horizontal axis and the pixel number corresponding to each gray scale level as the vertical axis, and drawing a histogram.
[0059] S21: Obtain a reflection gray scale lifting amount, and exclude the reflection gray scale lifting amount interference in the gray scale histogram to obtain an adjusted overall interval.
[0060] It should be noted that the mobile phone hinge is a component with high smoothness, and thus reflection phenomenon is likely to occur on the mobile phone hinge. The existence of the reflection phenomenon will cause the texture information of these regions to be weakened, and thus affect the identification of the texture structure in the region. In order to exclude the interference of the reflection phenomenon, the reflection interference needs to be reduced when the image is enhanced.
[0061] It should be further noted that the gray scale value of the reflection region on the mobile phone hinge will be virtually high, and thus the interference of the reflection phenomenon on the weakening of the texture information can be reduced by excluding the virtually high gray scale value of the reflection region.
[0062] S210: Obtain a reflection gray scale lifting amount.
[0063] It should be noted that each region on the mobile phone hinge is affected by light differently, and there are many same components on the mobile phone hinge, and thus the same components that are less affected by light can be taken as a reference for the gray scale value of the reflection region to obtain the virtually high value of the gray scale value caused by reflection.
[0064] Preferably, as an example, obtaining a reflection gray scale lifting amount comprises:
[0065] Superpixel segmentation is performed on the mobile phone hinge image to obtain a plurality of superpixel regions;
[0066] Obtain a superpixel region with the largest gray scale value as an analysis reflection region;
[0067] Obtain the similarity between the analysis reflection region and other superpixel regions, and filter out superpixel regions with a similarity greater than a preset similarity threshold as reference regions of the analysis reflection region;
[0068] Obtain the mean value of the reference regions, and take the minimum value of the mean values of all reference regions as a reference value;
[0069] Take the difference between the mean value of the analysis reflection region and the reference value as the reflection gray scale lifting amount.
[0070] It can be understood that the reference region reflects the object which is less disturbed by light reflection and is the same as the analysis reflection region, so that the gray value of the reference region can be used to reflect the true gray value of the analysis reflection region, and then the gray value of the light reflection is obtained.
[0071] It should be noted that the similarity between the analysis reflection region and other super-pixel regions is obtained, including:
[0072] The edge line of the analysis reflection region is obtained, the edge line curvature value of each pixel on the edge line is obtained, and the edge line curvature value of all pixels on the edge line of the analysis reflection region is counted to obtain the curvature histogram of the analysis reflection region; the gray value of the analysis reflection region is counted to obtain the gray histogram of the analysis reflection region;
[0073] The curvature histogram and the gray histogram of each super-pixel region are obtained.
[0074] The cosine similarity of the curvature histogram and the cosine similarity of the gray histogram of the analysis reflection region and other super-pixel regions are added to obtain the similarity between the analysis reflection region and other super-pixel regions.
[0075] It can be understood that the similarity is comprehensively evaluated from two aspects of gray value and shape, and the accuracy of the similarity evaluation is improved.
[0076] S211: excluding the light reflection gray value increase interference in the gray histogram to obtain the adjusted overall interval.
[0077] It should be noted that in order to reduce the light reflection interference, the gray value virtual high phenomenon caused by light reflection needs to be removed during image enhancement. The gray value of the light reflection region is larger than that of the non-light reflection region, so that the gray value virtual high of the light reflection region will cause the upper limit value of the gray level of the gray histogram to be increased, and thus the gray level virtual high caused by light reflection can be reduced by adjusting the upper limit value of the gray level downward.
[0078] Preferably, as an example, the adjusted overall interval obtained by excluding the light reflection gray value increase interference in the gray histogram includes:
[0079] The maximum value of the gray value in the gray histogram is obtained, the difference between the maximum value of the gray value and the light reflection gray value increase is taken as the upper limit value, and 0 is taken as the lower limit value.
[0080] The value interval between the lower limit value and the upper limit value is taken as the adjusted overall interval.
[0081] It can be understood that the gray value virtual high of the light reflection region will cause the upper limit value of the gray histogram of the image to be increased, and thus the light reflection effect can be reduced by subtracting the gray value increase caused by light reflection from the upper limit value.
[0082] At this point, the gray scale histogram is adjusted to a proper value range by removing the false high gray scale value caused by the reflection area, thereby providing a basis for obtaining a high-quality image with weak reflection interference.
[0083] S3: Calculate the neighborhood contrast of each gray scale level in the gray scale histogram, and perform clustering processing on all gray scale levels in the gray scale histogram according to the neighborhood contrast to obtain a plurality of sub-intervals, and calculate the adjusted length of each sub-interval.
[0084] It should be noted that, in order to prevent the phenomenon of over-enhancing the texture with high contrast or under-enhancing the texture with low contrast, the enhancement degree needs to be adjusted according to the contrast.
[0085] It should be further noted that the longer the mapped sub-interval is, the stronger the enhancement degree is, and thus the mapped sub-length can be adjusted according to the contrast.
[0086] S30: Calculate the neighborhood contrast of each gray scale level in the gray scale histogram.
[0087] Preferably, as an example, the calculation of the neighborhood contrast of each gray scale level in the gray scale histogram includes:
[0088] The difference between the mean value of the gray scale value of each superpixel region and the mean value of the gray scale value of the adjacent superpixel region is taken as the contrast of each superpixel region;
[0089] The superpixel region in which each pixel in each gray scale level is located is obtained, and the mean value of the contrast of the superpixel region in which all pixels in each gray scale level are located is taken as the neighborhood contrast of each gray scale level.
[0090] It can be understood that the neighborhood contrast of each gray scale level reflects the contrast of the texture at the pixel corresponding to the gray scale level. The greater the value is, the greater the contrast of the texture at the pixel corresponding to the gray scale level is.
[0091] S31: Perform clustering processing on all gray scale levels in the gray scale histogram according to the neighborhood contrast to obtain a plurality of sub-intervals.
[0092] Preferably, as an example, the clustering processing on all gray scale levels in the gray scale histogram according to the neighborhood contrast to obtain a plurality of sub-intervals includes:
[0093] The clustering processing on all gray scale levels in the gray scale histogram according to the neighborhood contrast obtains a plurality of categories, and the interval formed by the gray scale levels in each category is taken as a sub-interval. The clustering algorithm used in this embodiment is the DBSAN clustering algorithm, and other embodiments can use other clustering algorithms, which are not specifically limited in this embodiment.
[0094] S32: Calculate the adjusted length of each sub-interval.
[0095] Preferably, as an example, the adjusted length of each sub-interval is calculated, including:
[0096]
[0097] wherein, represents the length of the i-th sub-interval, represents the length of the j-th sub-interval, represents the average neighborhood contrast of all gray levels in the i-th sub-interval, represents the average neighborhood contrast of all gray levels in the j-th sub-interval, represents the length of the adjusted overall interval, and M represents the number of sub-intervals, represents the adjusted length of the i-th sub-interval, represents the upward rounding symbol.
[0098] It can be understood that, represents the proportion of the i-th gray interval in the entire interval, reflects the situation of the average contrast compared to the contrast of the i-th gray interval. The larger the value, the weaker the i-th gray interval compared to the average contrast, and thus the more blurred the texture of the pixels corresponding to the i-th gray interval, and the more it needs to be enhanced. Therefore, by correcting the proportion of the i-th gray interval, the proportion of the gray interval with weak contrast is adjusted larger, and the proportion of the gray interval with strong contrast is adjusted smaller. Z reflects the length of the adjusted overall interval, and the adjusted overall interval is the value interval after removing the reflection interference. By multiplying Z is to compress each sub-interval into the adjusted overall interval, thereby providing a basis for subsequent image enhancement to reduce reflection interference.
[0099] S4: dividing the adjusted overall interval according to the adjusted length of each sub-interval to obtain the adjusted interval of each sub-interval, taking the adjusted interval of each sub-interval as the equalized value interval of each sub-interval, and performing histogram equalization processing on each sub-interval in the gray histogram to obtain an enhanced mobile phone hinge image to assist mobile phone hinge defect detection.
[0100] S40: dividing the adjusted overall interval according to the adjusted length of each sub-interval to obtain the adjusted interval of each sub-interval.
[0101] Preferably, as an example, the adjusted interval of each sub-interval is obtained by dividing the adjusted overall interval according to the adjusted length of each sub-interval, including:
[0102] According to the arrangement order of the sub-intervals from left to right, the intervals with the adjusted length are sequentially intercepted on the adjusted overall interval as the adjusted interval of each sub-interval.
[0103] S41: Take the adjusted interval of each sub-interval as the equalized value interval of each sub-interval, and perform histogram equalization processing on each sub-interval in the gray scale histogram to obtain an enhanced mobile phone hinge image.
[0104] Preferably, as an example, taking the adjusted interval of each sub-interval as the equalized value interval of each sub-interval, and performing histogram equalization processing on each sub-interval in the gray scale histogram to obtain an enhanced mobile phone hinge image, comprises:
[0105] Taking the adjusted interval of each sub-interval as the mapped value interval of each sub-interval, taking the histogram in each sub-interval as an independent histogram, and based on the mapped value interval of each sub-interval, using a histogram equalization algorithm to perform histogram equalization processing on each sub-interval in the gray scale histogram to obtain an enhanced mobile phone hinge image. Figure 3 The enhanced mobile phone hinge image is displayed. Figure 3 It can be seen that the enhanced mobile phone hinge image can effectively suppress the reflection area, and can also effectively enhance some detailed textures.
[0106] It should be noted that histogram equalization processing on each sub-interval based on the mapped value interval of each sub-interval using a histogram equalization algorithm is prior art, which will not be described here.
[0107] It should be further noted that by setting a longer mapped length for a sub-interval with lower contrast to improve the enhancement intensity of the texture with lower contrast, and setting a shorter mapped length for a sub-interval with higher contrast to reduce the enhancement intensity of the texture with lower contrast, the textures of each level can be better presented.
[0108] S42: Assist in mobile phone hinge defect detection.
[0109] Preferably, as an example, assisting in mobile phone hinge defect detection, comprises:
[0110] A defect recognition network is constructed, and the defect recognition network can be a YoloV5 network or an SSD network, and the embodiment does not make specific limitations.
[0111] The enhanced mobile phone hinge image is input into the defect recognition network to obtain a defect area in the mobile phone hinge.
[0112] The embodiment of the application also discloses a mobile phone hinge appearance quality detection system based on machine vision, comprising a processor and a memory, and the memory stores computer program instructions, which realize the mobile phone hinge appearance quality detection method based on machine vision according to the application when the computer program instructions are executed by the processor.
[0113] The system also includes other components known to those skilled in the art such as a communication bus and communication interfaces, the arrangement and function of which are known in the art and thus will not be described here.
[0114] In this application, the term "computer readable medium" can also include the computer readable storage media. The computer readable storage media can be any available media that can be accessed by the computer. By way of example, and not limitation, such computer readable storage media can comprise RAM, ROM, EEPROM, CD-ROM or other optical disk storage, magnetic disk storage or other magnetic storage devices, or any other medium that can be used to store desired program code in the form of instructions or data structures and that can be accessed by a computer. Also, the computer readable storage media can be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.
Claims
1. A method for detecting the appearance quality of a mobile phone hinge based on machine vision, characterized in that, The method comprises the following steps: acquiring a mobile phone hinge image; statistically obtaining a gray scale histogram of the mobile phone hinge image, obtaining a reflection gray scale promotion amount, and excluding the reflection gray scale promotion amount interference in the gray scale histogram to obtain an adjusted overall interval; calculating the neighborhood contrast of each gray scale level in the gray scale histogram, clustering all gray scale levels of the gray scale histogram according to the neighborhood contrast to obtain a plurality of sub-intervals, adjusting the proportion of the neighborhood contrast of the gray scale level in each sub-interval to the adjusted overall interval to obtain the adjusted length of each sub-interval, comprising: ; wherein, , denote the length of the i-th subinterval and the j-th subinterval, respectively, denote the average of the neighborhood contrast of all gray levels in the i-th subinterval, denote the average of the neighborhood contrast of all gray levels in the j-th subinterval, denote the length of the adjusted overall interval, denote the adjusted length of the i-th subinterval, denote the ceiling function. dividing the adjusted overall interval according to the adjusted length of each sub-interval to obtain the adjusted interval of each sub-interval, taking the adjusted interval of each sub-interval as the value interval of each sub-interval after equalization, and performing histogram equalization processing on each sub-interval in the gray scale histogram to obtain an enhanced mobile phone hinge image to assist mobile phone hinge defect detection. 2.The machine vision-based mobile phone hinge appearance quality detection method according to claim 1, characterized in that, The method comprises the following steps: taking each gray scale value of the mobile phone hinge image as a gray scale level, obtaining the pixel number of each gray scale level, taking the gray scale level as the horizontal axis and the pixel number corresponding to each gray scale level as the vertical axis, and drawing a histogram. 3.The machine vision-based mobile phone hinge appearance quality detection method according to claim 1, characterized in that, The method comprises the following steps: performing superpixel segmentation on the mobile phone hinge image to obtain a plurality of superpixel regions; obtaining a superpixel region with the maximum gray scale value as an analysis reflection region; obtaining the similarity between the analysis reflection region and each superpixel region, and screening out the superpixel region with a similarity greater than a preset similarity threshold as a reference region of the analysis reflection region; obtaining the mean value of the reference region, and taking the minimum value of the mean value of all reference regions as a reference value; taking the difference between the mean value of the analysis reflection region and the reference value as the reflection gray scale promotion amount. 4.The machine vision-based mobile phone hinge appearance quality detection method according to claim 3, characterized in that, The method comprises the following steps: obtaining the edge of the analysis reflection region, statistically obtaining the curvature of all pixels on the edge of the analysis reflection region to obtain the curvature histogram of the analysis reflection region, and statistically obtaining the gray scale value of the analysis reflection region to obtain the gray scale histogram of the analysis reflection region; obtaining the curvature histogram and the gray scale histogram of each superpixel region; adding the cosine similarity of the curvature histogram and the cosine similarity of the gray scale histogram to obtain the similarity between the analysis reflection region and each superpixel region. 5.The machine vision-based mobile phone hinge appearance quality detection method according to claim 1, characterized in that, The method comprises the following steps: obtaining the maximum gray scale value in the gray scale histogram, taking the difference between the maximum gray scale value and the reflection gray scale promotion amount as an upper limit value, and taking 0 as a lower limit value; taking the value interval between the lower limit value and the upper limit value as the adjusted overall interval. 6.The machine vision-based mobile phone hinge appearance quality detection method according to claim 1, characterized in that, The method comprises the following steps: taking the difference between the mean value of the gray scale value of each superpixel region and the mean value of the gray scale value of the adjacent superpixel region as the contrast of each superpixel region; obtaining the superpixel region where each pixel in each gray scale level is located, and taking the mean value of the contrast of the superpixel region where all pixels in each gray scale level are located as the neighborhood contrast of each gray scale level. 7.The machine vision-based mobile phone hinge appearance quality detection method according to claim 1, characterized in that, The enhanced mobile phone hinge image is obtained by respectively performing histogram equalization processing on each sub-interval in the gray scale histogram, and the method comprises the steps of: The adjusted interval of each sub-interval is taken as the value interval after mapping of each sub-interval, the histogram in each sub-interval is taken as an independent histogram, and the enhanced mobile phone hinge image is obtained by respectively performing histogram equalization processing on each sub-interval in the gray scale histogram based on the value interval after mapping of each sub-interval by using a histogram equalization algorithm. 8.The machine vision-based mobile phone hinge appearance quality detection method according to claim 1, wherein, The method is used for assisting in mobile phone hinge defect detection, and the method comprises the steps of: A defect detection network is constructed. The enhanced mobile phone hinge image is input into the defect detection network to obtain a defect area in the mobile phone hinge.
9. A mobile phone hinge appearance quality detection system based on machine vision, characterized in that, The method comprises the following steps: A processor and a memory are provided, and the memory stores computer program instructions, which, when executed by the processor, implement the machine vision-based mobile phone hinge appearance quality detection method according to any one of claims 1-8.
Citation Information
Patent Citations
Gray scale image processor
CA1216933A
Face on-duty monitoring terminal based on temperature sensing analysis
CN119228783A