CN114359160A - Screen detection method and device, electronic equipment and storage medium - Google Patents

Screen detection method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN114359160A
CN114359160A CN202111505576.XA CN202111505576A CN114359160A CN 114359160 A CN114359160 A CN 114359160A CN 202111505576 A CN202111505576 A CN 202111505576A CN 114359160 A CN114359160 A CN 114359160A
Authority
CN
China
Prior art keywords
screen
image
preset
camera
detected
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
CN202111505576.XA
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.)
Luster LightTech Co Ltd
Suzhou Luster Vision Intelligent Device Co Ltd
Suzhou Lingyunguang Industrial Intelligent Technology Co Ltd
Original Assignee
Luster LightTech Co Ltd
Suzhou Luster Vision Intelligent Device Co Ltd
Suzhou Lingyunguang Industrial Intelligent Technology 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 Luster LightTech Co Ltd, Suzhou Luster Vision Intelligent Device Co Ltd, Suzhou Lingyunguang Industrial Intelligent Technology Co Ltd filed Critical Luster LightTech Co Ltd
Priority to CN202111505576.XA priority Critical patent/CN114359160A/en
Publication of CN114359160A publication Critical patent/CN114359160A/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
    • G06T7/0004Industrial image inspection
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M11/00Testing of optical apparatus; Testing structures by optical methods not otherwise provided for
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M11/00Testing of optical apparatus; Testing structures by optical methods not otherwise provided for
    • G01M11/02Testing optical properties
    • G01M11/0242Testing optical properties by measuring geometrical properties or aberrations
    • G01M11/0278Detecting defects of the object to be tested, e.g. scratches or dust
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge 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
    • G01MEASURING; TESTING
    • G01NINVESTIGATING OR ANALYSING MATERIALS BY DETERMINING THEIR CHEMICAL OR PHYSICAL PROPERTIES
    • G01N21/00Investigating or analysing materials by the use of optical means, i.e. using sub-millimetre waves, infrared, visible or ultraviolet light
    • G01N21/84Systems specially adapted for particular applications
    • G01N21/88Investigating the presence of flaws or contamination
    • G01N21/8851Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges
    • G01N2021/8887Scan or image signal processing specially adapted therefor, e.g. for scan signal adjustment, for detecting different kinds of defects, for compensating for structures, markings, edges based on image processing techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30108Industrial image inspection
    • G06T2207/30121CRT, LCD or plasma display

Abstract

The embodiment of the invention discloses a screen detection method and device, electronic equipment and a storage medium. Wherein, the method comprises the following steps: acquiring a camera image of a screen to be detected through preset camera equipment; determining screen information of a screen to be detected in the camera image, and judging whether the screen information meets a preset image processing condition; if so, dividing the camera image according to a preset image segmentation algorithm to obtain at least two screen images; and carrying out appearance detection on the screen image according to a preset image detection algorithm to obtain a detection result of the screen. According to the embodiment of the invention, the camera image is processed according to the screen information to obtain an accurate screen image, and the detection precision of the screen is improved.

Description

Screen detection method and device, electronic equipment and storage medium
Technical Field
The embodiment of the invention relates to an image processing technology, in particular to a screen detection method and device, electronic equipment and a storage medium.
Background
With the development of intelligent manufacturing and industrial vision industries, AOI (Automated Optical Inspection) appearance detection equipment is applied more and more widely, detection objects of the AOI equipment are more and more diverse, and the appearance of a display screen can be detected.
In the face of various camera imaging effects, the upper computer detection software of the AOI equipment cannot directly detect camera images. In the related art, by setting a Region of Interest (ROI), only image data in the Region of Interest is read and detected. The detection scene of the method is single, the screen image cannot be automatically acquired from the camera image in a complex scene, the acquisition flexibility of the screen image is low, and the efficiency and the precision of screen detection are influenced.
Disclosure of Invention
The embodiment of the invention provides a screen detection method and device, electronic equipment and a storage medium, and aims to improve the screen detection efficiency and precision.
In a first aspect, an embodiment of the present invention provides a method for detecting a screen, where the method includes:
acquiring a camera image of a screen to be detected through preset camera equipment;
determining screen information of a screen to be detected in the camera image, and judging whether the screen information meets a preset image processing condition;
if so, dividing the camera image according to a preset image segmentation algorithm to obtain at least two screen images;
and carrying out appearance detection on the screen image according to a preset image detection algorithm to obtain a detection result of the screen.
In a second aspect, an embodiment of the present invention further provides a device for detecting a screen, where the device includes:
the camera image acquisition module is used for acquiring a camera image of the screen to be detected through preset camera equipment;
the screen information judging module is used for determining the screen information of a screen to be detected in the camera image and judging whether the screen information meets the preset image processing condition;
the screen image obtaining module is used for dividing the camera image according to a preset image segmentation algorithm to obtain at least two screen images if the camera image is in the preset image segmentation algorithm;
and the screen detection module is used for carrying out appearance detection on the screen image according to a preset image detection algorithm to obtain a detection result of the screen.
In a third aspect, an embodiment of the present invention further provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor executes the computer program to implement the screen detection method according to any embodiment of the present invention.
In a fourth aspect, embodiments of the present invention further provide a storage medium containing computer-executable instructions, which when executed by a computer processor, are used to perform a method for detecting a screen according to any of the embodiments of the present invention.
According to the embodiment of the invention, the camera equipment is used for shooting the screen to be detected to obtain the camera image. Acquiring screen information from the camera image, and determining whether image processing is required to be performed on the camera image according to the screen information. If necessary, dividing the camera image according to a preset image segmentation algorithm to obtain a plurality of screen images. And detecting the screen image to obtain a detection result of the screen appearance. The problem of among the prior art, can only obtain the screen image through the ROI region is solved, screen detection error that the ROI region is not the correct screen image causes is avoided. By acquiring the screen information, it can be determined whether image division is required in the current scene. If yes, the camera image is automatically divided, an ROI (region of interest) area does not need to be set, the determining precision and flexibility of the screen image are improved, and the efficiency and precision of screen detection are further improved.
Drawings
FIG. 1 is a flowchart illustrating a method for detecting a screen according to a first embodiment of the present invention;
FIG. 2 is a schematic diagram illustrating image segmentation under a stroboscopic light source according to a first embodiment of the present invention;
FIG. 3 is a flowchart illustrating a method for detecting a screen according to a second embodiment of the present invention;
FIG. 4 is a schematic diagram of a multi-screen camera according to a second embodiment of the present invention;
FIG. 5 is a flowchart illustrating a method for detecting a screen according to a third embodiment of the present invention;
FIG. 6 is a schematic diagram of partial image stitching according to a third embodiment of the present invention;
FIG. 7 is a block diagram of a detecting apparatus for detecting a screen according to a fourth embodiment of the present invention;
fig. 8 is a schematic structural diagram of a detection device of a screen in the fifth embodiment of the present invention.
Detailed Description
The present invention will be described in further detail with reference to the accompanying drawings and examples. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and are not limiting of the invention. It should be further noted that, for the convenience of description, only some of the structures related to the present invention are shown in the drawings, not all of the structures.
Example one
Fig. 1 is a flowchart illustrating a method for detecting a screen according to an embodiment of the present invention, where the method is applicable to detecting an appearance of a device screen, and the method can be executed by a device for detecting a screen. As shown in fig. 1, the method specifically includes the following steps:
and 110, acquiring a camera image of the screen to be detected through preset camera equipment.
The preset camera device can be an image acquisition device such as a line-scan camera or an area-array camera, the use scene of the line-scan camera is that the detection object performs line scanning imaging along with the movement of the carrying platform, and the use scene of the area-array camera is that the detection object performs imaging under the condition that the carrying platform is static. The camera equipment is matched with different light sources, or camera images with different imaging effects can be formed under the condition of different brightness of the same light source.
In this embodiment, the detection object placed on the carrier may be a screen of a device with a display function, or a screen of a device with a display function, such as a mobile phone screen, a tablet screen, a computer screen, or a vehicle-mounted screen, that is, the detection object is a screen to be detected. The camera equipment can shoot the screen to be detected in real time or at regular time according to actual detection requirements or a preset image acquisition cycle, and the shot image is a camera image. And acquiring a camera image acquired by the camera equipment, so that the screen in the camera image can be conveniently detected. When a camera image of a screen to be detected is acquired, the screen to be detected can be in a static or moving state, the camera image can comprise a plurality of screens or a single screen, and the size of each screen to be detected in the camera image can be the same or different.
And step 120, determining screen information of a screen to be detected in the camera image, and judging whether the screen information meets a preset image processing condition.
The screen information of the screen to be detected in the camera image may include a screen size, a screen number, a number of stroboscopic light sources appearing in the image, and the like. After the camera image is obtained, screen information is acquired from the camera image. And presetting image processing conditions, and judging whether the screen information meets the preset image processing conditions. For example, if the image processing condition is multi-screen, it is determined that the screen information satisfies the image processing condition when there are a plurality of screens in the camera image.
In this embodiment, optionally, the screen information includes the number of strobe light sources; accordingly, determining whether the screen information satisfies a preset image processing condition includes: and judging whether the number of the stroboscopic light sources is greater than a preset light source number threshold value or not, and if so, determining that the screen information meets the preset image processing conditions.
Specifically, the camera device may be a line scan camera, the line scan camera may be configured with a plurality of stroboscopic light sources, and the image content output in each line of the camera image may correspond to one light source. For example, the line scan camera is collocated with three light sources, namely, a light source 1, a light source 2 and a light source 3. The three light sources are subjected to periodic stroboscopic, the light source of the first row of images in the camera image is the light source 1, the second row of images is the light source 2, the third row of images is the light source 3, the fourth row of images is the light source 1, the fifth row of images is the light source 2, and the light sources are sequentially arranged downwards in a period mode. The image processing condition may be that the number of strobe light sources is greater than a preset light source number threshold, which may be one. Judging whether the number of the intermediate-frequency flash sources in the camera image is more than one, and if so, determining that the screen information meets the preset image processing condition; if not, determining that the screen information does not meet the preset image processing condition, and directly acquiring the region of interest from the camera image for screen detection without segmenting the camera image. The beneficial effect that sets up like this lies in, camera equipment collocation different light sources can obtain diversified camera imaging effect, satisfies the complicated scene requirement that detects to the screen when actual detection, improves the flexibility and the variety that detect, and then improves the efficiency and the precision that detect.
And step 130, if yes, dividing the camera image according to a preset image segmentation algorithm to obtain at least two screen images.
The method comprises the steps of presetting an image segmentation algorithm, if it is determined that screen information meets preset image processing conditions, dividing a camera image according to the image segmentation algorithm, dividing the camera image into a plurality of screen images, wherein each screen image can comprise a complete screen. For example, if there are four screens in the camera image, and the four screens are located at four corners of the screen, the four corners of the screen are divided into four screen images.
In this embodiment, optionally, the dividing the camera image according to a preset image segmentation algorithm to obtain at least two screen images includes: creating at least two original images according to the number of the intermediate-frequency flash sources in the camera images; wherein the number of the original images is consistent with the number of the stroboscopic light sources; and extracting partial images of any stroboscopic light source in the camera images, and pasting the partial images to the original images corresponding to the stroboscopic light source to obtain the screen image of the screen to be detected under the stroboscopic light source.
Specifically, in a scene with multiple stroboscopic light sources, the image segmentation algorithm may be to create multiple preset original images according to the number of stroboscopic light sources, extract image portions of each stroboscopic light source in the camera image, copy an image portion of one stroboscopic light source to one original image, and use the copied original image as a screen image.
After camera images under various stroboscopic light sources are obtained, at least two original images are created according to a preset image segmentation algorithm, the original images can be blank images, the number of the original images is consistent with that of the stroboscopic light sources, and one original image corresponds to one stroboscopic light source. For example, with three strobe light sources, three blank raw images are created.
And extracting the images of the stroboscopic light sources from the camera image according to the number of the stroboscopic light sources in lines to form partial images. That is, each line of image is a partial image, and each line of image corresponds to a strobe light source. And sequentially pasting all partial images of a stroboscopic light source in the camera image into the original image corresponding to the stroboscopic light source in a line sequence until all partial images of the stroboscopic light source in the camera image are pasted completely, so as to obtain a complete screen image under each stroboscopic light source. Fig. 2 is a schematic diagram of image segmentation under a stroboscopic light source in the embodiment of the present invention. There are three kinds of stroboscopic light sources in the camera image in fig. 2, and in the case of one light source, the image of the screen to be detected may have 1000 lines, 3000 lines under the three kinds of light sources, and the three kinds of stroboscopic light sources are periodically illuminated, that is, every three lines in the 3000 line image are one period. The camera image is used as an original image, partial images of each line corresponding to the three stroboscopic light sources in the camera image are extracted, the partial images of the stroboscopic light sources are copied to a pre-created blank image, and three complete screen images of the screen to be detected under the three stroboscopic light sources are obtained. The beneficial effect that sets up like this lies in, can realize under the use scene of multiple light source that the screen image of treating the screen that detects is acquireed automatically, has solved when adopting ROI region, can't export the problem of the part image of every light source, satisfies the requirement of complicated detection environment, improves the flexibility of acquireing of screen image, realizes carrying out the screen detection under multiple light source, improves the detection efficiency and the precision of screen image.
And 140, performing appearance detection on the screen image according to a preset image detection algorithm to obtain a detection result of the screen.
Wherein, an image detection algorithm is preset, for example, the image detection algorithm may be to detect the size, appearance and the like of a screen image in a dark screen situation. The AOI appearance detection equipment can be adopted to detect the screen image to obtain the detection result of the screen to be detected. In this embodiment, the image detection algorithm of the screen is not specifically limited.
According to the technical scheme, the camera equipment is used for shooting the screen to be detected to obtain the camera image. Acquiring screen information from the camera image, and determining whether image processing is required to be performed on the camera image according to the screen information. If necessary, dividing the camera image according to a preset image segmentation algorithm to obtain a plurality of screen images. And detecting the screen image to obtain a detection result of the screen appearance. The problem of among the prior art, can only obtain the screen image through the ROI region is solved, screen detection error that the ROI region is not the screen image causes is avoided. By acquiring the screen information, it can be determined whether image division is required in the current scene. If yes, the camera image is automatically divided, an ROI (region of interest) area does not need to be set, the determining precision and flexibility of the screen image are improved, and the efficiency and precision of screen detection are further improved.
Example two
Fig. 3 is a flowchart illustrating a screen detection method according to a second embodiment of the present invention, which is further optimized based on the second embodiment.
In this embodiment, whether the screen information satisfies the preset image processing condition may be detailed as follows: and judging whether the screen number is larger than a preset screen number threshold value, and if so, determining that the screen information meets the preset image processing condition.
As shown in fig. 3, the method specifically includes the following steps:
and 310, acquiring a camera image of the screen to be detected through preset camera equipment.
And step 320, determining screen information of the screen to be detected in the camera image, wherein the screen information comprises the number of screens.
Step 330, determining whether the screen number is greater than a preset screen number threshold, and if so, determining that the screen information meets a preset image processing condition.
The screen information in the camera image may include the number of screens, and the number of screens captured in the camera image may be determined according to the camera image. For example, a plurality of screens to be detected are placed at preset positions, and image acquisition is performed on a preset position range to obtain a camera image including the plurality of screens to be detected. The preset image processing condition may be a plurality of screens in the camera image for which a preset screen number threshold exists, and the preset screen number threshold may be one. After the number of screens in the camera image is determined, comparing the number of screens with a preset screen number threshold value, and judging whether the number of screens is greater than the preset screen number threshold value. If yes, determining that a plurality of screens exist in the camera image, wherein the screen information meets the preset image processing condition; if not, determining that the screen information does not meet the preset image processing condition, and directly acquiring the region of interest from the camera image for screen detection without segmenting the camera image. FIG. 4 is a diagram illustrating a multi-screen camera image according to an embodiment of the invention. In fig. 4, there are two screens to be detected, which are the detection object 1 and the detection object 2, respectively, and therefore, the camera image needs to be divided. The beneficial effect who sets up like this lies in, can satisfy the requirement that carries out the while detection to many screens, realizes the screen detection under the complicated scene, improves the flexibility that detects, and then improves and detect precision and efficiency.
And 340, if the screen information meets the preset image processing conditions, dividing the camera image according to a preset image segmentation algorithm to obtain at least two screen images.
The method comprises the steps of presetting an image segmentation algorithm, if the number of screens is determined to be larger than a preset screen number threshold value, dividing a camera image according to the image segmentation algorithm, dividing the camera image into a plurality of screen images, wherein each screen image can comprise a complete screen.
In this embodiment, optionally, the dividing the camera image according to a preset image segmentation algorithm to obtain at least two screen images includes: creating at least two original images according to the number of screens in the camera image; wherein, the number of the original images is consistent with the number of the screens; dividing the camera images according to the number of screens to obtain at least two single-screen images; and pasting the single-screen image on the original image to obtain at least two screen images.
Specifically, the image segmentation algorithm may determine each screen in the camera image, and create a plurality of preset original images according to the number of the screens, where the number of the original images is consistent with the number of the screens. Each screen is divided from the camera image, and the divided images are respectively copied to the original image to obtain a plurality of screen images.
After the screen number is determined to be larger than the preset screen number threshold, original images with the screen number are created according to an image segmentation algorithm, and the original images can be blank images. For example, if there are two screens to be detected in the camera image, two blank raw images are created. And dividing a plurality of complete images of the screen to be detected from the camera image, wherein each divided image comprises one screen to be detected, so that the divided images are single-screen images. The placing position and the placing angle of the screen to be detected can be preset, so that the position of the screen to be detected in the camera image can be directly determined, and image segmentation is facilitated. And one screen to be detected corresponds to one original image, and the single-screen image of each screen to be detected is pasted to the corresponding original image to obtain the screen image of each screen to be detected. After the screen image is obtained, the screen image can be rotated, so that subsequent detection is facilitated. The beneficial effect that sets up like this lies in, has solved among the prior art, adopts the ROI region can't obtain the problem that a plurality of screens of waiting to detect in the camera image, avoids obtaining wrong screen image, has satisfied the requirement of the complicated scene that a plurality of screens of waiting to detect acquire, improves the flexibility of acquireing of screen image, and then improves screen image's detection efficiency and precision.
There may be both a stroboscopic light source and a plurality of screens to be detected in the camera image. After the camera image is obtained, whether the number of the stroboscopic light sources is larger than a preset light source number threshold value or not can be judged firstly, if yes, at least two original images are created according to the number of the stroboscopic light sources in the camera image; wherein the number of original images is identical to the number of strobe light sources. Extracting partial images of any stroboscopic light source in the camera images, and pasting the partial images to original images corresponding to the stroboscopic light source to obtain a first screen image of the screen to be detected under the stroboscopic light source. And then judging whether the number of the screens in the camera image is greater than a preset screen number threshold value or not, and also judging whether the number of the screens in the first screen image is greater than a preset screen number threshold value or not. If yes, creating at least two original images according to the number of screens in the camera image; wherein the number of the original images is consistent with the number of the screens. And dividing the camera images according to the number of screens to obtain at least two single-screen images, and pasting the single-screen images on the original image to obtain at least two second screen images. And performing appearance detection on the second screen image according to a preset image detection algorithm to obtain a detection result of the screen. And if the number of the screens is less than or equal to the preset screen number threshold, performing appearance detection on the first screen image according to a preset image detection algorithm to obtain a screen detection result.
And if the number of the stroboscopic light sources is less than or equal to the preset light source number threshold, directly judging whether the number of the screens in the camera image is greater than the preset screen number threshold. And if so, creating at least two original images according to the number of screens in the camera image. And dividing the camera images according to the number of screens to obtain at least two single-screen images. And pasting the single-screen image on the original image to obtain at least two second screen images. And performing appearance detection on the second screen image according to a preset image detection algorithm to obtain a detection result of the screen. If not, directly carrying out screen detection on the region of interest on the camera image.
And 350, performing appearance detection on the screen image according to a preset image detection algorithm to obtain a detection result of the screen.
According to the embodiment of the invention, the camera equipment is used for shooting the screen to be detected to obtain the camera image. Screen information is acquired from the camera image, for example, the number of screens is determined. And determining whether image processing is required to be carried out on the camera image according to the number of screens. If necessary, dividing the camera image according to a preset image segmentation algorithm to obtain a plurality of screen images. And detecting the screen image to obtain a detection result of the screen appearance. The problem of among the prior art, can only obtain the screen image through the ROI region is solved, screen detection error that the ROI region is not the screen image causes is avoided. By acquiring the screen information, it can be determined whether image division is required in the current scene. If yes, the camera image is automatically divided, an ROI (region of interest) area does not need to be set, the determination precision and flexibility of the screen image are improved, the detection requirement of a complex environment is met, and the efficiency and precision of screen detection are further improved.
EXAMPLE III
Fig. 5 is a flowchart illustrating a method for detecting a screen according to a third embodiment of the present invention, which is further optimized based on the above embodiments.
In this embodiment, whether the screen information satisfies the preset image processing condition may be detailed as follows: determining whether the local image is a preset screen ending image or not according to the position of the local screen to be detected in the local image at the screen to be detected; if yes, determining that the screen information meets the preset image processing conditions.
As shown in fig. 5, the method specifically includes the following steps:
and 510, acquiring a camera image of the screen to be detected through preset camera equipment, wherein the camera image is a local image of the screen to be detected.
The camera device can acquire images of the whole screen to be detected and can also acquire images of local parts of the screen to be detected, namely, the camera images can be images of the local screen to be detected, and the local images of the screen to be detected are local images. The camera equipment can shoot the screen to be detected for multiple times, and the shooting angle is adjusted once every shooting until all positions in the screen to be detected are shot. For example, the camera device may start from the top of the screen to be detected and shoot from top to bottom, and may shoot ten times each time one tenth of the screen length, so as to obtain ten partial images of the screen to be detected.
And step 520, determining screen information of the screen to be detected in the camera image, wherein the screen information is the position of the screen to be detected in the local image.
If the camera image is a local image of the screen to be detected, the screen information may include the number of the stroboscopic light sources, the size of the local screen to be detected in the local image, the position of the local screen to be detected in the local image in the whole screen to be detected, and the like. The position of the local screen to be detected in the whole screen to be detected may be a coordinate position of the local screen to be detected in the whole screen to be detected, for example, the local screen to be detected in the local image is a position in an upper left corner coordinate range in the whole screen to be detected.
Step 530, determining whether the local image is a preset screen end image or not according to the position of the local screen to be detected in the local image at the screen to be detected; if yes, determining that the screen information meets the preset image processing conditions.
The method comprises the steps of presetting an image processing condition, wherein the image processing condition can be that whether a local image is the last local image of a screen to be detected or not is judged, and if yes, the local image is determined to meet the preset image processing condition. The last local image of the screen to be detected can be preset as the screen ending image, and the position of the local screen to be detected in the screen ending image in the whole screen to be detected can be set. After the local image is obtained, determining the position of the local screen to be detected in the local image in the whole screen to be detected, and judging whether the position is the position of the local screen to be detected in the screen ending image in the whole screen to be detected. If yes, determining that the local image is a preset screen end image, wherein the screen information of the local image meets the preset image processing condition. If the local image is not the preset screen end image, determining that all parts of the screen to be detected are not completely shot, and continuously shooting the local part of the screen to be detected until the local image is the preset screen end image. The beneficial effect who sets up like this lies in, can treat the local of detecting the screen and shoot in proper order, is favorable to looking over the local detail in the screen, avoids screen information to lose, improves the precision that the screen detected.
And 540, creating an original image of the screen to be detected according to the image size of at least one partial image of the screen to be detected.
After the screen information is determined to meet the preset image processing conditions, all local images of the screen to be detected are determined to be obtained. The size of each partial image is obtained, and an original image is created according to the size of the partial image, wherein the original image can be a blank image. The sizes of the partial images can be the same or different, and the sizes of the partial images can be added to be used as the size of the original image, so that the original image can contain all the partial images of the screen to be detected.
And 550, pasting at least one local image into the original image according to the position of the local screen to be detected in the local image in the screen to be detected, and splicing the at least one local image into the screen image of the screen to be detected.
After the original image of the screen to be detected is obtained, copying each partial image to the original image according to the position of the partial screen to be detected in the screen to be detected, and splicing the partial images into a complete screen image of the screen to be detected.
In this embodiment, the light sources of the respective local images may be the same or different, and have no influence on the stitching of the local images. Fig. 6 is a schematic diagram of partial image stitching in the embodiment of the present invention. In fig. 6, there are two light sources, only one light source in each partial image, and there are 40 partial images. The size of the partial image is 100 × 500, and the size of the screen image is 800 × 2500.
And 560, performing appearance detection on the screen image according to a preset image detection algorithm to obtain a detection result of the screen.
According to the embodiment of the invention, the camera equipment is used for shooting the screen to be detected to obtain the local image. And acquiring screen information from the local image, and determining whether the local image needs to be subjected to image processing or not according to the screen information. If necessary, creating an original image according to the size of the local image, and splicing the local image into the original image to obtain a complete screen image. And detecting the screen image to obtain a detection result of the screen appearance. The problem that in the prior art, the ROI function cannot obtain a complete screen image when a camera outputs a large number of local images is solved, and diversification of screen detection scenes is achieved. By acquiring the screen information, whether image splicing is needed in the current scene can be determined. If yes, the camera images are automatically spliced without setting an ROI (region of interest), the determination precision and flexibility of the screen images are improved, and the screen detection efficiency and precision are further improved.
Example four
Fig. 7 is a block diagram of a screen detection apparatus according to a fourth embodiment of the present invention, which is capable of executing a screen detection method according to any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method. As shown in fig. 7, the apparatus specifically includes:
a camera image obtaining module 701, configured to obtain a camera image of a screen to be detected through a preset camera device;
a screen information determining module 702, configured to determine screen information of a screen to be detected in the camera image, and determine whether the screen information meets a preset image processing condition;
a screen image obtaining module 703, configured to divide the camera image according to a preset image segmentation algorithm if the camera image is a video image, so as to obtain at least two screen images;
and the screen detection module 704 is configured to perform appearance detection on the screen image according to a preset image detection algorithm to obtain a detection result of the screen.
Optionally, the screen information includes the number of strobe light sources;
accordingly, the screen information determining module 702 includes:
and the stroboscopic light source judging unit is used for judging whether the number of the stroboscopic light sources is greater than a preset light source number threshold value or not, and if so, determining that the screen information meets the preset image processing condition.
Optionally, the screen image obtaining module 703 includes:
an original image creating unit for creating at least two original images according to the number of the intermediate frequency flash sources in the camera image; wherein the number of the original images is consistent with the number of the stroboscopic light sources;
and the partial image extraction unit is used for extracting a partial image of any stroboscopic light source in the camera image, and pasting the partial image to an original image corresponding to the stroboscopic light source to obtain a screen image of the screen to be detected under the stroboscopic light source.
Optionally, the screen information includes the number of screens;
accordingly, the screen information determining module 702 further includes:
and the screen number judging unit is used for judging whether the screen number is greater than a preset screen number threshold value or not, and if so, determining that the screen information meets a preset image processing condition.
Optionally, the screen image obtaining module 703 further includes:
an original image determining unit for creating at least two original images according to the number of screens in the camera image; wherein the number of the original images is consistent with the number of the screens;
the single-screen image obtaining unit is used for dividing the camera images according to the number of the screens to obtain at least two single-screen images;
and the single-screen image pasting unit is used for pasting the single-screen image on the original image to obtain at least two screen images.
Optionally, the camera image is a local image of a screen to be detected, and the screen information is a position of the local screen to be detected in the local image, where the local screen to be detected is located;
accordingly, the screen information determining module 702 further includes:
the local image judging unit is used for determining whether the local image is a preset screen end image or not according to the position of the local screen to be detected in the local image at the screen to be detected;
and if so, determining that the screen information meets the preset image processing condition.
Optionally, the apparatus further comprises:
an original image obtaining unit, configured to create an original image of the screen to be detected according to an image size of at least one partial image of the screen to be detected after it is determined that the screen information satisfies a preset image processing condition;
and the local image splicing unit is used for pasting at least one local image into the original image according to the position of the local screen to be detected in the local image in the screen to be detected, and splicing the local image into the screen image of the screen to be detected.
According to the embodiment of the invention, the camera equipment is used for shooting the screen to be detected to obtain the camera image. Acquiring screen information from the camera image, and determining whether image processing is required to be performed on the camera image according to the screen information. If necessary, dividing the camera image according to a preset image segmentation algorithm to obtain a plurality of screen images. And detecting the screen image to obtain a detection result of the screen appearance. The problem of among the prior art, can only obtain the screen image through the ROI region is solved, screen detection error that the ROI region is not the screen image causes is avoided. By acquiring the screen information, it can be determined whether image division is required in the current scene. If yes, the camera image is automatically divided, an ROI (region of interest) area does not need to be set, the determining precision and flexibility of the screen image are improved, and the efficiency and precision of screen detection are further improved.
EXAMPLE five
Fig. 8 is a schematic structural diagram of a detection device for a screen according to a fifth embodiment of the present invention. The detection device of the screen is an electronic device and fig. 8 shows a block diagram of an exemplary electronic device 800 suitable for implementing an embodiment of the invention. The electronic device 800 shown in fig. 8 is only an example and should not bring any limitations to the function and scope of use of the embodiments of the present invention.
As shown in fig. 8, electronic device 800 is in the form of a general purpose computing device. The components of the electronic device 800 may include, but are not limited to: one or more processors or processing units 801, a system memory 802, and a bus 803 that couples various system components including the system memory 802 and the processing unit 801.
Bus 803 represents one or more of any of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, and a processor or local bus using any of a variety of bus architectures. By way of example, such architectures include, but are not limited to, Industry Standard Architecture (ISA) bus, micro-channel architecture (MAC) bus, enhanced ISA bus, Video Electronics Standards Association (VESA) local bus, and Peripheral Component Interconnect (PCI) bus.
Electronic device 800 typically includes a variety of computer system readable media. Such media may be any available media that is accessible by electronic device 800 and includes both volatile and nonvolatile media, removable and non-removable media.
The system memory 802 may include computer system readable media in the form of volatile memory, such as Random Access Memory (RAM)804 and/or cache memory 805. The electronic device 800 may further include other removable/non-removable, volatile/nonvolatile computer system storage media. By way of example only, storage system 806 may be used to read from and write to non-removable, nonvolatile magnetic media (not shown in FIG. 8, and commonly referred to as a "hard drive"). Although not shown in FIG. 8, a magnetic disk drive for reading from and writing to a removable, nonvolatile magnetic disk (e.g., a "floppy disk") and an optical disk drive for reading from or writing to a removable, nonvolatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to the bus 803 by one or more data media interfaces. Memory 802 may include at least one program product having a set (e.g., at least one) of program modules that are configured to carry out the functions of embodiments of the invention.
A program/utility 808 having a set (at least one) of program modules 807 may be stored, for instance, in memory 802, such program modules 807 including, but not limited to, an operating system, one or more application programs, other program modules, and program data, each of which examples or some combination thereof may include an implementation of a network environment. Program modules 807 generally perform the functions and/or methodologies of embodiments of the present invention as described herein.
The electronic device 800 may also communicate with one or more external devices 809 (e.g., keyboard, pointing device, display 810, etc.), with one or more devices that enable a user to interact with the electronic device 800, and/or with any devices (e.g., network card, modem, etc.) that enable the electronic device 800 to communicate with one or more other computing devices. Such communication may occur via an input/output (I/O) interface 811. Also, the electronic device 800 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 812. As shown in FIG. 8, the network adapter 812 communicates with the other modules of the electronic device 800 via the bus 803. It should be appreciated that although not shown in FIG. 8, other hardware and/or software modules may be used in conjunction with electronic device 800, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, among others.
The processing unit 801 executes various functional applications and data processing by running a program stored in the system memory 802, for example, implementing a screen detection method provided by an embodiment of the present invention, including:
acquiring a camera image of a screen to be detected through preset camera equipment;
determining screen information of a screen to be detected in the camera image, and judging whether the screen information meets a preset image processing condition;
if so, dividing the camera image according to a preset image segmentation algorithm to obtain at least two screen images;
and carrying out appearance detection on the screen image according to a preset image detection algorithm to obtain a detection result of the screen.
EXAMPLE six
The sixth embodiment of the present invention further provides a storage medium containing computer-executable instructions, where the storage medium stores a computer program, and when the computer program is executed by a processor, the method for detecting a screen according to the sixth embodiment of the present invention is implemented, where the method includes:
acquiring a camera image of a screen to be detected through preset camera equipment;
determining screen information of a screen to be detected in the camera image, and judging whether the screen information meets a preset image processing condition;
if so, dividing the camera image according to a preset image segmentation algorithm to obtain at least two screen images;
and carrying out appearance detection on the screen image according to a preset image detection algorithm to obtain a detection result of the screen.
Computer storage media for embodiments of the invention may employ any combination of one or more computer-readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
A computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
Computer program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, Smalltalk, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
It is to be noted that the foregoing is only illustrative of the preferred embodiments of the present invention and the technical principles employed. It will be understood by those skilled in the art that the present invention is not limited to the particular embodiments described herein, but is capable of various obvious changes, rearrangements and substitutions as will now become apparent to those skilled in the art without departing from the scope of the invention. Therefore, although the present invention has been described in greater detail by the above embodiments, the present invention is not limited to the above embodiments, and may include other equivalent embodiments without departing from the spirit of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims (10)

1. A method for detecting a screen, comprising:
acquiring a camera image of a screen to be detected through preset camera equipment;
determining screen information of a screen to be detected in the camera image, and judging whether the screen information meets a preset image processing condition;
if so, dividing the camera image according to a preset image segmentation algorithm to obtain at least two screen images;
and carrying out appearance detection on the screen image according to a preset image detection algorithm to obtain a detection result of the screen.
2. The method of claim 1, wherein the screen information includes a number of strobe light sources;
correspondingly, judging whether the screen information meets preset image processing conditions includes:
and judging whether the number of the stroboscopic light sources is greater than a preset light source number threshold value, if so, determining that the screen information meets preset image processing conditions.
3. The method of claim 2, wherein dividing the camera image according to a predetermined image segmentation algorithm to obtain at least two screen images comprises:
creating at least two original images according to the number of the intermediate-frequency flash sources in the camera images; wherein the number of the original images is consistent with the number of the stroboscopic light sources;
and extracting a partial image of any stroboscopic light source in the camera image, and pasting the partial image to an original image corresponding to the stroboscopic light source to obtain a screen image of the screen to be detected under the stroboscopic light source.
4. The method of claim 1, wherein the screen information includes a screen number;
correspondingly, judging whether the screen information meets preset image processing conditions includes:
and judging whether the screen number is larger than a preset screen number threshold value, and if so, determining that the screen information meets a preset image processing condition.
5. The method of claim 4, wherein dividing the camera image according to a predetermined image segmentation algorithm to obtain at least two screen images comprises:
creating at least two original images according to the number of screens in the camera image; wherein the number of the original images is consistent with the number of the screens;
dividing the camera images according to the number of the screens to obtain at least two single-screen images;
and pasting the single-screen image on the original image to obtain at least two screen images.
6. The method according to claim 1, wherein the camera image is a partial image of a screen to be detected, and the screen information is a position of the screen to be detected in the partial image;
correspondingly, judging whether the screen information meets preset image processing conditions includes:
determining whether the local image is a preset screen ending image or not according to the position of the local screen to be detected in the local image at the screen to be detected;
and if so, determining that the screen information meets the preset image processing condition.
7. The method according to claim 6, further comprising, after determining that the screen information satisfies a preset image processing condition:
creating an original image of the screen to be detected according to the image size of at least one local image of the screen to be detected;
and pasting at least one local image into the original image according to the position of the local screen to be detected in the local image in the screen to be detected, and splicing the local image into the screen image of the screen to be detected.
8. A device for detecting a screen, comprising:
the camera image acquisition module is used for acquiring a camera image of the screen to be detected through preset camera equipment;
the screen information judging module is used for determining the screen information of a screen to be detected in the camera image and judging whether the screen information meets the preset image processing condition;
the screen image obtaining module is used for dividing the camera image according to a preset image segmentation algorithm to obtain at least two screen images if the camera image is in the preset image segmentation algorithm;
and the screen detection module is used for carrying out appearance detection on the screen image according to a preset image detection algorithm to obtain a detection result of the screen.
9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, characterized in that the processor implements the method of detecting a screen according to any one of claims 1 to 7 when executing the program.
10. A storage medium containing computer-executable instructions for performing the method of detecting a screen of any one of claims 1-7 when executed by a computer processor.
CN202111505576.XA 2021-12-10 2021-12-10 Screen detection method and device, electronic equipment and storage medium Pending CN114359160A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111505576.XA CN114359160A (en) 2021-12-10 2021-12-10 Screen detection method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111505576.XA CN114359160A (en) 2021-12-10 2021-12-10 Screen detection method and device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114359160A true CN114359160A (en) 2022-04-15

Family

ID=81099837

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111505576.XA Pending CN114359160A (en) 2021-12-10 2021-12-10 Screen detection method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114359160A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115598136A (en) * 2022-10-28 2023-01-13 深圳市元硕自动化科技有限公司(Cn) Detection apparatus for screen rubber coating quality

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190098248A1 (en) * 2017-09-27 2019-03-28 JVC Kenwood Corporation Captured image display device, captured image display method, and captured image display program
CN110351530A (en) * 2019-07-31 2019-10-18 Tcl王牌电器(惠州)有限公司 Polyphaser realizes method, system and the computer readable storage medium of screen detection
CN112285118A (en) * 2020-10-22 2021-01-29 苏州佳智彩光电科技有限公司 AMOLED screen appearance visual detection method and device

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190098248A1 (en) * 2017-09-27 2019-03-28 JVC Kenwood Corporation Captured image display device, captured image display method, and captured image display program
CN110351530A (en) * 2019-07-31 2019-10-18 Tcl王牌电器(惠州)有限公司 Polyphaser realizes method, system and the computer readable storage medium of screen detection
CN112285118A (en) * 2020-10-22 2021-01-29 苏州佳智彩光电科技有限公司 AMOLED screen appearance visual detection method and device

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115598136A (en) * 2022-10-28 2023-01-13 深圳市元硕自动化科技有限公司(Cn) Detection apparatus for screen rubber coating quality
CN115598136B (en) * 2022-10-28 2023-08-08 深圳市元硕自动化科技有限公司 Screen gluing quality detection device

Similar Documents

Publication Publication Date Title
US11151712B2 (en) Method and apparatus for detecting image defects, computing device, and computer readable storage medium
CN109766879B (en) Character detection model generation method, character detection device, character detection equipment and medium
CN108564082B (en) Image processing method, device, server and medium
CN109215037B (en) Target image segmentation method and device and terminal equipment
CN109255767B (en) Image processing method and device
CN109829397B (en) Video annotation method and system based on image clustering and electronic equipment
CN107895377B (en) Foreground target extraction method, device, equipment and storage medium
CN110781823B (en) Screen recording detection method and device, readable medium and electronic equipment
CN112149583A (en) Smoke detection method, terminal device and storage medium
CN112559341A (en) Picture testing method, device, equipment and storage medium
CN113255516A (en) Living body detection method and device and electronic equipment
CN110390295B (en) Image information identification method and device and storage medium
CN112308069A (en) Click test method, device, equipment and storage medium for software interface
CN107357422B (en) Camera-projection interactive touch control method, device and computer readable storage medium
US11348254B2 (en) Visual search method, computer device, and storage medium
CN114359160A (en) Screen detection method and device, electronic equipment and storage medium
CN111476759A (en) Screen surface detection method and device, terminal and storage medium
CN115222653B (en) Test method and device
CN113963000B (en) Image segmentation method, device, electronic equipment and program product
CN113034449B (en) Target detection model training method and device and communication equipment
CN113206987B (en) Method, device and terminal for projection display and non-transitory storage medium
CN114639056A (en) Live content identification method and device, computer equipment and storage medium
CN112559340A (en) Picture testing method, device, equipment and storage medium
CN111124862B (en) Intelligent device performance testing method and device and intelligent device
CN114220011A (en) Goods quantity identification method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination