CN114445358A - Method and system for detecting appearance defects of edges of middle frame of mobile phone, storage medium and computer equipment - Google Patents

Method and system for detecting appearance defects of edges of middle frame of mobile phone, storage medium and computer equipment Download PDF

Info

Publication number
CN114445358A
CN114445358A CN202210069450.0A CN202210069450A CN114445358A CN 114445358 A CN114445358 A CN 114445358A CN 202210069450 A CN202210069450 A CN 202210069450A CN 114445358 A CN114445358 A CN 114445358A
Authority
CN
China
Prior art keywords
image
middle frame
mobile phone
edge
target image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210069450.0A
Other languages
Chinese (zh)
Inventor
金浩阳
贾东风
程力行
袁振华
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Qiku Software Shenzhen Co Ltd
Original Assignee
Qiku Software Shenzhen Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Qiku Software Shenzhen Co Ltd filed Critical Qiku Software Shenzhen Co Ltd
Priority to CN202210069450.0A priority Critical patent/CN114445358A/en
Publication of CN114445358A publication Critical patent/CN114445358A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/136Segmentation; Edge detection involving thresholding
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20092Interactive image processing based on input by user
    • G06T2207/20104Interactive definition of region of interest [ROI]

Abstract

The invention provides a method for detecting the edge appearance defects of a mobile phone middle frame, which comprises the steps of obtaining an image to be detected of the mobile phone middle frame; intercepting a middle frame edge image of a preset ROI (region of interest) in the image to be detected; performing binarization threshold processing on the middle frame edge image, and extracting a target image with a preset pixel height; and counting information according to the pixel value of the target image in the vertical projection to screen the edge appearance defect. The invention also provides a system for detecting the appearance defects of the edges of the middle frame of the mobile phone, a storage medium and computer equipment. Therefore, the invention can accurately detect the edge appearance defects of the middle frame of the mobile phone and has lower detection cost and higher detection efficiency.

Description

Method and system for detecting appearance defects of edges of middle frame of mobile phone, storage medium and computer equipment
Technical Field
The invention relates to the technical field of product detection, in particular to a method and a system for detecting appearance defects of edges of a middle frame of a mobile phone, a storage medium and computer equipment.
Background
The mobile phone middle frame is a middle plate between a mobile phone screen and a battery; in the production and manufacturing process, the edge appearance defects of the mobile phone middle frame are easily caused, wherein the edge appearance refers to the appearance of the edge part of the middle frame which is exposed at the side of the external screen of the mobile phone and has the macroscopic width of about 1 mm. For this reason, it is necessary to detect the edge appearance defect of the middle frame of the mobile phone in the production process.
In the scheme provided by the prior art, a data set is manufactured by collecting good images and defect images, and detection is performed by using a deep learning image segmentation method. The disadvantages are that: in production practice, the defect samples generally have less data and are not beneficial to constructing a deep learning data set, and the model trained by a small number of sample images generally has limited adaptability; moreover, the sizes of the defects are random and irregular, and if the defect types are defined and divided manually, incomplete classification coverage is easily caused; therefore, if a defect sample image is originally insufficient and a defect condition not covered by the data set is encountered at the same time, detection omission occurs. Moreover, the image segmentation method for deep learning requires high computation resources, and usually takes more than 1 second, which affects the detection efficiency.
As can be seen, the conventional method has many problems in practical use, and therefore, needs to be improved.
Disclosure of Invention
In view of the above-mentioned defects, an object of the present invention is to provide a method, a system, a storage medium and a computer device for detecting edge appearance defects of a middle frame of a mobile phone, which can accurately detect edge appearance defects of a middle frame of a mobile phone, and have lower detection cost and higher detection efficiency.
In order to achieve the above object, the present invention provides a method for detecting appearance defects of a middle frame edge of a mobile phone, comprising the steps of:
acquiring an image to be detected of a middle frame of the mobile phone;
intercepting a middle frame edge image of a preset ROI (region of interest) in the image to be detected;
performing binarization threshold processing on the middle frame edge image, and extracting a target image with a preset pixel height;
and counting information according to the pixel value of the target image in the vertical projection to screen the edge appearance defect.
Optionally, the step of performing binarization threshold processing on the middle frame edge image and extracting a target image with a preset pixel height specifically includes:
carrying out binarization threshold processing on the middle frame edge image to obtain a binarization image;
intercepting a target image with a preset pixel height from the binary image; and the preset pixel height is determined based on the precision specification of the detection of the middle frame of the mobile phone.
Optionally, the step of screening the edge appearance defect according to the statistical information of the pixel values of the target image in the vertical projection specifically includes:
carrying out vertical projection on the target image to obtain a vertical projection image of each pixel value distribution of the target image;
counting the horizontal width with the continuous projection height being zero in the vertical projection drawing;
and if the horizontal width with the continuous projection height of zero exceeds a preset defect size threshold, determining that the corresponding position is an edge appearance defect.
Optionally, the step of counting horizontal widths of the continuous projection heights in the vertical projection graph, which are zero, specifically includes:
and screening zero pixel value projection areas of the vertical projection drawing in the horizontal axis direction, and respectively counting the continuous horizontal width of each zero pixel value projection area.
Optionally, after the step of screening the edge appearance defect according to the statistical information of the pixel values of the target image in the vertical projection, the method further includes:
and marking the distribution position of the edge appearance defect on the target image and generating a corresponding prompt message.
Optionally, the prompt information includes the horizontal width corresponding to the edge appearance defect.
Optionally, the step of obtaining the image to be detected of the middle frame of the mobile phone specifically includes:
acquiring an image to be detected, which is irradiated by a strip light source on a fixed station in an auxiliary manner, of a mobile phone middle frame; the strip-shaped light source is a red light source.
Still provide a cell-phone center edge appearance defect detecting system, including:
the image acquisition unit is used for acquiring an image to be detected of the middle frame of the mobile phone;
the region intercepting unit is used for intercepting a middle frame edge image of a preset ROI region in the image to be detected;
the image processing unit is used for carrying out binarization threshold processing on the middle frame edge image and extracting a target image with a preset pixel height;
and the defect analysis unit is used for screening the edge appearance defects according to the pixel value statistical information of the target image in the vertical projection.
In addition, a storage medium and a computer device are provided, the storage medium is used for storing a computer program for executing the mobile phone middle frame edge appearance defect detection method.
The computer device comprises a storage medium, a processor and a computer program which is stored on the storage medium and can run on the processor, and the processor executes the computer program to realize the method for detecting the appearance defects of the middle frame edge of the mobile phone.
The invention relates to a method and a system for detecting appearance defects of edges of a mobile phone middle frame, which are used for acquiring an image to be detected of the mobile phone middle frame and intercepting the middle frame edge image of a preset ROI (region of interest); performing binarization threshold processing on the middle frame edge image, and extracting a target image with a preset pixel height; and then vertically projecting the target image, and screening the edge appearance defects according to the pixel statistical information in the vertical projection. Therefore, the method does not need to collect a large number of samples in advance and label data, and can directly utilize an image processing algorithm to detect the defects; meanwhile, real-time analysis can be achieved in the algorithm detection stage on a common industrial control computer, and the method is low in cost and high in speed.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for detecting appearance defects of a middle frame edge of a mobile phone according to an embodiment of the present invention;
fig. 2 is a flowchart illustrating optional steps of the method for detecting the appearance defect of the middle frame edge of the mobile phone according to an embodiment of the present invention;
fig. 3 is a flowchart illustrating optional steps of an appearance defect analysis of the method for detecting appearance defects of the middle frame edge of the mobile phone according to an embodiment of the present invention;
fig. 4 is a schematic block diagram of a structure of the mobile phone center frame edge appearance defect detection system according to an embodiment of the present invention;
fig. 5 is a schematic block diagram of an alternative structure of the image processing unit of the mobile phone middle frame edge appearance defect detection system according to an embodiment of the present invention;
fig. 6 is a schematic block diagram of an alternative structure of the defect analysis unit of the mobile phone middle frame edge appearance defect detection system according to an embodiment of the present invention;
fig. 7 is an illustration of an imaging diagram of the method for detecting the apparent defect of the middle frame edge of the mobile phone after the binarization threshold processing according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
It should be noted that references in the specification to "one embodiment," "an example embodiment," etc., indicate that the embodiment described may include a particular feature, structure, or characteristic, but every embodiment may not necessarily include the particular feature, structure, or characteristic. Moreover, such phrases are not intended to refer to the same embodiment. Further, when a particular feature, structure, or characteristic is described in connection with an embodiment, it is submitted that it is within the knowledge of one skilled in the art to effect such feature, structure, or characteristic in connection with other embodiments whether or not explicitly described.
Moreover, where certain terms are used throughout the description and following claims to refer to particular components or features, those skilled in the art will understand that manufacturers may refer to a component or feature by different names or terms. This specification and the claims that follow do not intend to distinguish between components or features that differ in name but not function. In the following description and in the claims, the terms "include" and "comprise" are used in an open-ended fashion, and thus should be interpreted to mean "include, but not limited to. In addition, the term "connected" as used herein includes any direct and indirect electrical connection. Indirect electrical connection means include connection by other means.
Fig. 1 shows a method for detecting appearance defects of a mobile phone middle frame edge according to an embodiment of the present invention, which includes the following steps:
s101: and acquiring an image to be detected of the middle frame of the mobile phone. The image to be measured of the embodiment is formed by shooting the middle frame of the mobile phone by an industrial camera.
S102: and intercepting a middle frame edge image of a preset ROI (region of interest) in the image to be detected. Specifically, in the embodiment, the industrial camera is used for shooting the fixed area of the middle frame of the mobile phone to obtain the image to be detected, and then the corresponding ROI (region of interest), such as a rectangular area, is preset according to the position of the edge of the middle frame of the mobile phone; that is, the preset ROI region is the middle frame edge region, and the corresponding middle frame edge image is cut according to the boundary of the preset ROI region in this embodiment.
S103: and carrying out binarization threshold processing on the middle frame edge image, and extracting a target image with a preset pixel height. Because the strip-shaped edges occupy most of the picture in the middle frame edge image, the middle frame edge image is converted into an image with two pixel threshold values by utilizing binarization threshold value processing, and a corresponding target image is cut from the image according to the preset pixel height; after the binarization threshold value processing, the difference between the middle frame edge and the background in the image is obvious, so that a target image with a more concentrated range can be further extracted according to the preset pixel height.
Referring to fig. 2, in an alternative embodiment, step S103 specifically includes:
s1031: and (4) carrying out binarization threshold processing on the middle frame edge image to obtain a binarization image. Specifically, referring to fig. 7, the present embodiment converts the middle frame edge image into a black-and-white image with a pixel value of only 0 or 255 by using a binarization threshold processing;
s1032: intercepting a target image with a preset pixel height from the binary image; and the preset pixel height is determined based on the precision specification of the detection of the middle frame of the mobile phone. In practice, different precision specifications exist in the detection of the middle frame of the mobile phone due to different detection precision requirements of manufacturers, for example, the precision specification needs to ensure the defect detection precision of the middle frame of the mobile phone within 1mm or 2 mm; optionally, if the defect detection accuracy is 1mm, the corresponding pixel height is 5 pixel heights. Fig. 7 shows the binarized image after the binarization threshold processing of the present embodiment, and the illustrated middle white area constitutes a significant difference from the upper and lower black edges, that is, the middle white area is the middle frame area of the mobile phone; in specific implementation, the preset pixel height (for example, 5 pixel heights or 10 pixel heights) of the middle white area of the binarized image is extracted according to the preset pixel height determined by the precision requirement, and the extracted pixel height is marked as a target image.
S104: and counting information according to the pixel value of the target image in the vertical projection to screen the edge appearance defect. Vertical projection refers to the result of a two-dimensional image projected in rows in the direction of the longitudinal axis, which can be considered a one-dimensional image; in this embodiment, a vertical projection technology of an image is adopted to obtain a distribution condition of pixel values corresponding to each region on a target image, and further, whether an edge appearance defect exists on a middle frame of a mobile phone is identified according to statistical information of the pixel values.
Referring to fig. 3, in an alternative embodiment, step S104 specifically includes:
s1041: and carrying out vertical projection on the target image to obtain a vertical projection image of each pixel value distribution of the target image. The vertical projection is a one-dimensional image of a target image projected to the direction of a longitudinal axis in rows, the horizontal axis of the one-dimensional image corresponds to the horizontal position on the target image, and the position of each horizontal axis corresponds to the number of pixels; for example, if a certain position is a dark background area, the pixel value is 0 on the vertical axis corresponding to the vertical projection; on the contrary, if the other position is a white frame region, the pixel values on the corresponding vertical axis on the vertical projection drawing are 255; accordingly, when the vertical axes in the vertical projection drawing are all pixel values 0, the region is characterized as the background region, and otherwise, when the vertical axes in the vertical projection drawing are all pixel values 255, the region is characterized as the cell phone middle frame edge (i.e., there is no edge appearance defect here). Specifically, if any pixel value is 255 at a certain vertical position on the target image, the projection height of the vertical axis projected on the vertical projection diagram is not zero; if the pixel value is 0 at a certain vertical position, the projection height of the vertical axis projected on the vertical projection graph is zero; the present embodiment only needs to focus on the area where the projection height is zero on the vertical projection view.
S1042: and counting the horizontal width of the continuous projection height of zero in the vertical projection graph. Wherein the horizontal width refers to a continuous layer transverse span with all pixel values of continuous vertical projection being 0; therefore, there may be several horizontal widths corresponding to different positions in the vertical projection view, or the projection heights in the vertical projection view are all 255 pixel values. Optionally, step S1042 specifically includes: and screening zero pixel value projection areas of the vertical projection drawing in the horizontal axis direction, and respectively counting the continuous horizontal width of each zero pixel value projection area. Since the area of the edge appearance defect is a background area (a black area with a pixel value of 0 in the binarized image), the horizontal axis position corresponding to the zero pixel value projection area in the vertical projection image is the position of the edge appearance defect, and thus, the horizontal dimension of the edge appearance defect can be determined by counting the horizontal and horizontal spans corresponding to the zero pixel value projection areas in the embodiment.
S1043: and if the horizontal width with the continuous projection height of zero exceeds a preset defect size threshold, determining that the corresponding position is an edge appearance defect. Specifically, a defect size threshold is preset according to the detection requirement, whether the counted horizontal width exceeds the defect size threshold is judged, and if the counted horizontal width exceeds the defect size threshold, the edge appearance defect at the corresponding position is represented to meet the detection requirement so as to be screened.
In an embodiment, after step S104, the method further includes: and marking the distribution position of the edge appearance defect on the target image and generating a corresponding prompt message. Optionally, the prompt information includes the horizontal width corresponding to the edge appearance defect. Namely, the prompt message is used for prompting the edge appearance defect and the size of the edge appearance defect at the corresponding position.
In an embodiment, step S101 specifically includes: acquiring an image to be detected, which is irradiated by a strip light source on a fixed station in an auxiliary manner, of a mobile phone middle frame; wherein, the strip light source is a red light source. Namely, a fixing station is preset in the embodiment, so that when the mobile phone middle frame is fixed to the fixing station, the mobile phone middle frame is ensured not to move, and the mobile phone middle frame is irradiated in an auxiliary manner by using a preset red strip light source; the red strip light source provides high-angle illumination so that an image shot by the middle frame of the mobile phone is clear; meanwhile, the appearance surface of the edge of the mobile phone middle frame is in a good picture range, the appearance surface of the edge of the mobile phone middle frame is bright white, and other backgrounds are dark black, so that the area to be detected and the background area can be better distinguished.
Optionally, step S102 specifically includes: determining an ROI (region of interest) corresponding to an image to be detected according to a frame to be detected of the mobile phone middle frame on the fixed station; and intercepting a middle frame edge image of the ROI area from the image to be detected. In practice, four frames in the mobile phone are stored, namely, four frames at the upper, lower, left and right sides, so that frame images at various positions need to be acquired respectively for detection; that is, the mobile phone middle frame has a plurality of different images to be detected, so that the corresponding ROI regions on each image to be detected are not necessarily the same, and therefore, in this embodiment, the corresponding ROI regions in the image to be detected are determined according to the edges to be detected (four edges of the upper, lower, left, and right frames) corresponding to the mobile phone middle frame, and then the region images in the ROI regions are captured. Of course, in other embodiments, all the edges to be measured (four frame edges, i.e., upper, lower, left, and right frame edges) may be mapped onto the same image to be measured, and then the corresponding middle frame edge image may be captured through each corresponding ROI region.
Fig. 4 shows a mobile phone middle frame edge appearance defect detection system 100 according to an embodiment of the present invention, which includes an image acquisition unit 10, an area extraction unit 20, an image processing unit 30, and a defect analysis unit 40, where:
the image acquisition unit 10 is used for acquiring an image to be detected of a middle frame of the mobile phone; the region intercepting unit 20 is configured to intercept a middle frame edge image of a preset ROI region in the image to be detected; the image processing unit 30 is configured to perform binarization threshold processing on the middle frame edge image, and extract a target image with a preset pixel height; the defect analysis unit 40 is used for counting information according to the pixel values of the target image in the vertical projection to screen the edge appearance defect.
Referring to fig. 5, in an alternative embodiment, the image processing unit 30 specifically includes a binarization processing sub-unit 31 and a clipping sub-unit 32, where:
the binarization processing subunit 31 is configured to perform binarization threshold processing on the middle frame edge image to obtain a binarization image; the intercepting subunit 32 is configured to intercept a target image with a preset pixel height from the binarized image; and the preset pixel height is determined based on the precision specification of the detection of the middle frame of the mobile phone.
Referring to fig. 6, in an alternative embodiment, the defect analysis unit 40 specifically includes a vertical projection subunit 41, a statistics subunit 42, and a defect determination subunit 43, where:
the vertical projection shadow unit 41 is configured to perform vertical projection on the target image to obtain a vertical projection image of each pixel value distribution of the target image; the statistic subunit 42 is configured to count horizontal widths of the vertical projection graph whose consecutive projection heights are zero; the defect determining subunit 43 is configured to determine that the corresponding position is an edge appearance defect if the horizontal width with the continuous projection height of zero exceeds a preset defect size threshold.
Optionally, the statistics subunit 42 is specifically configured to: and screening zero pixel value projection areas of the vertical projection drawing in the horizontal axis direction, and respectively counting the continuous horizontal width of each zero pixel value projection area.
In an embodiment, the system further comprises a marking and prompting unit, which is used for marking the distribution position of the edge appearance defect on the target image and generating a corresponding prompting message. Optionally, the prompt information includes the horizontal width corresponding to the edge appearance defect.
In an embodiment, the image obtaining unit 10 is specifically configured to: acquiring an image to be detected, which is irradiated by a strip light source on a fixed station in an auxiliary manner, of a mobile phone middle frame; the strip-shaped light source is a red light source.
Optionally, the area intercepting unit 20 specifically includes an area determining subunit and an area intercepting subunit, where:
the area determining subunit is used for determining an ROI (region of interest) corresponding to the image to be detected according to the frame to be detected of the mobile phone middle frame on the fixed station; and the region intercepting subunit is used for intercepting the middle frame edge image of the ROI from the image to be detected.
The invention also provides a device for detecting the appearance defects of the edges of the middle frames of the mobile phones, which comprises an industrial control computer, a mechanical arm, a rack, an industrial camera and a red strip-shaped light source; wherein:
the industrial control computer is responsible for the program operation of the mobile phone middle frame edge appearance defect detection system 100, the mechanical arm, the rack, the industrial camera and the like. The mechanical arm is used for grabbing a mobile phone middle frame to be tested and placing the mobile phone middle frame on a specified position (namely a fixed station) of the rack. The mechanical device of the rack clamps the middle frame of the mobile phone, so that the middle frame of the mobile phone is finally fixed at an accurate position, after the industrial camera respectively shoots the top and side images of the middle frame of the mobile phone for the first time, the mechanical arm grabs the middle frame of the mobile phone and rotates 180 degrees, and the middle frame of the mobile phone is placed on the rack again to shoot another edge and bottom edge position image. And the industrial camera is in a black-and-white mode, is opposite to the appearance surface of the frame at a fixed angle, acquires an image according to the signal of the industrial control computer, and transmits the acquired image to the industrial control computer for image processing and analysis. Meanwhile, in the shooting process of the industrial camera, a red strip-shaped light source is used for providing high-angle illumination for the edge of the middle frame of the mobile phone, so that the shot image is clear.
The invention also provides a storage medium for storing a computer program of the mobile phone middle frame edge appearance defect detection method shown in fig. 1-3. Such as computer program instructions, which when executed by a computer, may invoke or provide methods and/or aspects in accordance with the present application through the operation of the computer. Program instructions which invoke the methods of the present application may be stored on fixed or removable storage media and/or transmitted via a data stream over a broadcast or other signal-bearing medium and/or stored on a storage medium of a computer device operating in accordance with the program instructions. Here, according to an embodiment of the present application, a computer device including a mobile phone middle frame edge appearance defect detection system as shown in fig. 4 preferably includes a storage medium for storing a computer program and a processor for executing the computer program, wherein when the computer program is executed by the processor, the computer device is triggered to execute a method and/or a technical solution based on the foregoing embodiments.
It should be noted that the present application may be implemented in software and/or a combination of software and hardware, for example, implemented using Application Specific Integrated Circuits (ASICs), general purpose computers or any other similar hardware devices. In one embodiment, the software programs of the present application may be executed by a processor to implement the above steps or functions. Likewise, the software programs (including associated data structures) of the present application may be stored in a computer readable recording medium, such as RAM memory, magnetic or optical drive or diskette and the like. Additionally, some of the steps or functions of the present application may be implemented in hardware, for example, as circuitry that cooperates with the processor to perform various steps or functions.
The method according to the invention can be implemented on a computer as a computer-implemented method, or in dedicated hardware, or in a combination of both. Executable code for the method according to the invention or parts thereof may be stored on a computer program product. Examples of computer program products include memory devices, optical storage devices, integrated circuits, servers, online software, and so forth. Preferably, the computer program product comprises non-transitory program code means stored on a computer readable medium for performing the method according to the invention when said program product is executed on a computer.
In a preferred embodiment, the computer program comprises computer program code means adapted to perform all the steps of the method according to the invention when the computer program is run on a computer. Preferably, the computer program is embodied on a computer readable medium.
In summary, according to the method and the system for detecting the appearance defects of the edges of the middle frame of the mobile phone, the image to be detected of the middle frame of the mobile phone is obtained, and the image of the edges of the middle frame of the preset ROI area is captured; performing binarization threshold processing on the middle frame edge image, and extracting a target image with a preset pixel height; and then vertically projecting the target image, and screening the edge appearance defects according to the pixel statistical information in the vertical projection. Therefore, the method does not need to collect a large number of samples in advance and label data, and can directly utilize an image processing algorithm to detect the defects; meanwhile, real-time analysis can be achieved in the algorithm detection stage on a common industrial control computer, and the method is low in cost and high in speed.
The present invention may be embodied in other specific forms without departing from the spirit or essential attributes thereof, and it should be understood that various changes and modifications can be effected therein by one skilled in the art without departing from the spirit and scope of the invention as defined in the appended claims.
The invention also provides A1 and a method for detecting the appearance defects of the edges of the middle frame of the mobile phone, which comprises the following steps:
acquiring an image to be detected of a middle frame of the mobile phone;
intercepting a middle frame edge image of a preset ROI (region of interest) in the image to be detected;
performing binarization threshold processing on the middle frame edge image, and extracting a target image with a preset pixel height;
and counting information according to the pixel value of the target image in the vertical projection to screen the edge appearance defect.
A2, according to the method for detecting the appearance defects of the edges of the middle frame of the mobile phone in the A1, the step of performing binarization threshold processing on the image of the edge of the middle frame and extracting a target image with a preset pixel height specifically comprises the following steps:
carrying out binarization threshold processing on the middle frame edge image to obtain a binarization image;
intercepting a target image with a preset pixel height from the binary image; and the preset pixel height is determined based on the precision specification of the detection of the middle frame of the mobile phone.
A3, the method for detecting edge appearance defects of a mobile phone center according to a2, wherein the step of screening the edge appearance defects according to the statistical information of the pixel values of the target image in the vertical projection specifically includes:
carrying out vertical projection on the target image to obtain a vertical projection image of each pixel value distribution of the target image;
counting the horizontal width with the continuous projection height being zero in the vertical projection drawing;
and if the horizontal width with the continuous projection height of zero exceeds a preset defect size threshold, determining that the corresponding position is an edge appearance defect.
A4, according to the method for detecting appearance defects of cell phone middle frame edges described in A3, the step of counting the horizontal width with the continuous projection height of zero in the vertical projection drawing specifically includes:
and screening zero pixel value projection areas of the vertical projection drawing in the horizontal axis direction, and respectively counting the continuous horizontal width of each zero pixel value projection area.
A5, after the step of counting information according to the pixel values of the target image in the vertical projection to screen the edge appearance defect according to the mobile phone center edge appearance defect detection method of A3, the method further includes:
and marking the distribution position of the edge appearance defect on the target image and generating a corresponding prompt message.
A6, according to the method for detecting the edge appearance defects of the middle frame of the mobile phone in A5, the prompt message includes the horizontal width corresponding to the edge appearance defects.
A7, according to the method for detecting the edge appearance defects of the middle frame of the mobile phone in A1, the step of obtaining the image to be detected of the middle frame of the mobile phone specifically comprises the following steps:
acquiring an image to be detected, which is irradiated by a strip light source on a fixed station in an auxiliary manner, of a mobile phone middle frame; the strip-shaped light source is a red light source.
A8, according to the method for detecting the appearance defects of the edges of the middle frame of the mobile phone in the A7, the step of intercepting the image of the edges of the middle frame of the preset ROI area in the image to be detected specifically comprises the following steps:
determining an ROI (region of interest) corresponding to the image to be detected according to a frame to be detected of the mobile phone middle frame on the fixed station;
and intercepting a middle frame edge image of the ROI from the image to be detected.
B9, a mobile phone center edge appearance defect detection system is also provided, which comprises:
the image acquisition unit is used for acquiring an image to be detected of the middle frame of the mobile phone;
the region intercepting unit is used for intercepting a middle frame edge image of a preset ROI region in the image to be detected;
the image processing unit is used for carrying out binarization threshold processing on the middle frame edge image and extracting a target image with a preset pixel height;
and the defect analysis unit is used for screening the edge appearance defects according to the pixel value statistical information of the target image in the vertical projection.
B10, according to the mobile phone center edge appearance defect detecting system of B9, the image processing unit specifically includes:
a binarization processing subunit, configured to perform binarization threshold processing on the middle frame edge image to obtain a binarization image;
the intercepting subunit is used for intercepting a target image with a preset pixel height from the binarized image; and the preset pixel height is determined based on the precision specification of the detection of the middle frame of the mobile phone.
B11, according to the cell-phone center edge appearance defect detecting system of B10, the defect analyzing unit specifically includes:
the vertical projection subunit is used for performing vertical projection on the target image to obtain a vertical projection image of each pixel value distribution of the target image;
the statistical subunit is used for counting the horizontal width of the vertical projection graph with the continuous projection height being zero;
and the defect determining subunit is used for determining that the corresponding position is an edge appearance defect if the horizontal width with the continuous projection height of zero exceeds a preset defect size threshold.
B12, according to the mobile phone center edge appearance defect detection system of B11, the statistics subunit is specifically configured to:
and screening zero pixel value projection areas of the vertical projection drawing in the horizontal axis direction, and respectively counting the continuous horizontal width of each zero pixel value projection area.
B13, the system for detecting the appearance defects of the edges of the middle frame of the mobile phone according to B11, further comprising:
and the marking and prompting unit is used for marking the distribution position of the edge appearance defect on the target image and generating a corresponding prompting message.
B14, the mobile phone center edge appearance defect detection system according to B13, wherein the prompt message includes the horizontal width corresponding to the edge appearance defect.
B15, according to the mobile phone center edge appearance defect detecting system of B9, the image obtaining unit is specifically configured to:
acquiring an image to be detected, which is irradiated by a strip light source on a fixed station in an auxiliary manner, of a mobile phone middle frame; the strip-shaped light source is a red light source.
B16, according to the mobile phone center edge appearance defect detection system of B15, the region intercepting unit specifically includes:
the area determining subunit is used for determining an ROI (region of interest) corresponding to the image to be detected according to the frame to be detected of the mobile phone middle frame on the fixed station;
and the region intercepting subunit is used for intercepting the middle frame edge image of the ROI from the image to be detected.
The C17 and a storage medium are also provided for storing a computer program for executing the method for detecting the appearance defects of the frame edges in the mobile phone from A1 to A8.
The D18 is also provided, and the computer device comprises a storage medium, a processor and a computer program which is stored on the storage medium and can run on the processor, wherein the processor executes the computer program to realize the method for detecting the appearance defect of the middle frame edge of the mobile phone from A1 to A8.

Claims (10)

1. A method for detecting appearance defects of edges of a middle frame of a mobile phone is characterized by comprising the following steps:
acquiring an image to be detected of a middle frame of the mobile phone;
intercepting a middle frame edge image of a preset ROI (region of interest) in the image to be detected;
performing binarization threshold processing on the middle frame edge image, and extracting a target image with a preset pixel height;
and counting information according to the pixel value of the target image in the vertical projection to screen the edge appearance defect.
2. The method for detecting the apparent defects of the edges of the middle frame of the mobile phone according to claim 1, wherein the step of performing binarization threshold processing on the image of the edge of the middle frame and extracting a target image with a preset pixel height specifically comprises:
carrying out binarization threshold processing on the middle frame edge image to obtain a binarization image;
intercepting a target image with a preset pixel height from the binary image; and the preset pixel height is determined based on the precision specification of the detection of the middle frame of the mobile phone.
3. The method for detecting the edge appearance defects of the middle frame of the mobile phone according to claim 2, wherein the step of screening the edge appearance defects according to the pixel value statistical information of the target image in the vertical projection specifically comprises:
carrying out vertical projection on the target image to obtain a vertical projection image of each pixel value distribution of the target image;
counting the horizontal width with the continuous projection height being zero in the vertical projection drawing;
and if the horizontal width with the continuous projection height of zero exceeds a preset defect size threshold, determining that the corresponding position is an edge appearance defect.
4. The method for detecting appearance defects of the edges of the middle frame of the mobile phone according to claim 3, wherein the step of counting the horizontal widths of the continuous projection heights of zero in the vertical projection drawing specifically comprises:
and screening zero pixel value projection areas of the vertical projection drawing in the horizontal axis direction, and respectively counting the continuous horizontal width of each zero pixel value projection area.
5. The method for detecting the edge appearance defects of the middle frame of the mobile phone according to claim 3, wherein after the step of counting information according to the pixel values of the target image in the vertical projection to screen the edge appearance defects, the method further comprises:
and marking the distribution positions of the edge appearance defects on the target image, and generating corresponding prompt messages.
6. The method for detecting the appearance defect of the edge of the middle frame of the mobile phone according to claim 5, wherein the prompt message includes the horizontal width corresponding to the appearance defect of the edge.
7. The method for detecting the appearance defects of the edges of the middle frame of the mobile phone according to claim 1, wherein the step of obtaining the image to be detected of the middle frame of the mobile phone specifically comprises the following steps:
acquiring an image to be detected, which is irradiated by a strip light source on a fixed station in an auxiliary manner, of a mobile phone middle frame; the strip-shaped light source is a red light source.
8. The utility model provides a cell-phone center edge appearance defect detecting system which characterized in that, including:
the image acquisition unit is used for acquiring an image to be detected of the middle frame of the mobile phone;
the region intercepting unit is used for intercepting a middle frame edge image of a preset ROI region in the image to be detected;
the image processing unit is used for carrying out binarization threshold processing on the middle frame edge image and extracting a target image with a preset pixel height;
and the defect analysis unit is used for screening the edge appearance defects according to the pixel value statistical information of the target image in the vertical projection.
9. A storage medium storing a computer program for executing the method for detecting the appearance defect of the frame edge in the mobile phone according to any one of claims 1 to 7.
10. A computer device comprising a storage medium, a processor and a computer program stored on the storage medium and executable on the processor, wherein the processor implements the method for detecting the appearance defect of the frame edge in the mobile phone according to any one of claims 1 to 7 when executing the computer program.
CN202210069450.0A 2022-01-20 2022-01-20 Method and system for detecting appearance defects of edges of middle frame of mobile phone, storage medium and computer equipment Pending CN114445358A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210069450.0A CN114445358A (en) 2022-01-20 2022-01-20 Method and system for detecting appearance defects of edges of middle frame of mobile phone, storage medium and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210069450.0A CN114445358A (en) 2022-01-20 2022-01-20 Method and system for detecting appearance defects of edges of middle frame of mobile phone, storage medium and computer equipment

Publications (1)

Publication Number Publication Date
CN114445358A true CN114445358A (en) 2022-05-06

Family

ID=81367252

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210069450.0A Pending CN114445358A (en) 2022-01-20 2022-01-20 Method and system for detecting appearance defects of edges of middle frame of mobile phone, storage medium and computer equipment

Country Status (1)

Country Link
CN (1) CN114445358A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115032202A (en) * 2022-08-10 2022-09-09 山东唐乐生物科技股份有限公司 Method for removing residual impurities of stevioside product

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115032202A (en) * 2022-08-10 2022-09-09 山东唐乐生物科技股份有限公司 Method for removing residual impurities of stevioside product
CN115032202B (en) * 2022-08-10 2022-11-08 山东唐乐生物科技股份有限公司 Method for removing residual impurities of stevioside product

Similar Documents

Publication Publication Date Title
US11774735B2 (en) System and method for performing automated analysis of air samples
CN109859160A (en) Almag internal defect in cast image-recognizing method based on machine vision
WO2021102741A1 (en) Image analysis method and system for immunochromatographic detection
US11657599B2 (en) Method for detecting appearance of six sides of chip multi-layer ceramic capacitor based on artificial intelligence
CN116542975B (en) Defect classification method, device, equipment and medium for glass panel
TWI512284B (en) Bubble inspection system for glass
CN110991452A (en) Parking stall frame detection method, device, equipment and readable storage medium
CN114445358A (en) Method and system for detecting appearance defects of edges of middle frame of mobile phone, storage medium and computer equipment
CN115731493A (en) Rainfall micro physical characteristic parameter extraction and analysis method based on video image recognition
US9098914B2 (en) Enhanced analysis for image-based serpentine belt wear evaluation
CN117589770A (en) PCB patch board detection method, device, equipment and medium
CN116681677A (en) Lithium battery defect detection method, device and system
CN116993654A (en) Camera module defect detection method, device, equipment, storage medium and product
CN115761270A (en) Color card detection method and device, electronic equipment and storage medium
CN111523583B (en) Method for automatically identifying and classifying equipment nameplate photos by using unmanned aerial vehicle
CN108447107B (en) Method and apparatus for generating video
CN107491746B (en) Face pre-screening method based on large gradient pixel analysis
CN115060731B (en) Method for detecting scratch and metal exposure of negative membrane particles by variance algorithm
TW201518708A (en) Bubble inspection processing method for glass
CN112730427B (en) Product surface defect detection method and system based on machine vision
TWI802843B (en) Intelligent logistics data collection system
US10958899B2 (en) Evaluation of dynamic ranges of imaging devices
CN109785383B (en) Method and device for positioning and identifying test line in TVlines image and readable storage medium
CN117110299A (en) Display panel side wall defect detection method and device
CN117952906A (en) PIN skew detection method, device, equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication