CN114120307A - Display content identification method, device, equipment and storage medium - Google Patents

Display content identification method, device, equipment and storage medium Download PDF

Info

Publication number
CN114120307A
CN114120307A CN202111463175.2A CN202111463175A CN114120307A CN 114120307 A CN114120307 A CN 114120307A CN 202111463175 A CN202111463175 A CN 202111463175A CN 114120307 A CN114120307 A CN 114120307A
Authority
CN
China
Prior art keywords
display
image
area
preset
images
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
CN202111463175.2A
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.)
Yida Technology Shanghai Co ltd
Original Assignee
Yida Technology Shanghai 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 Yida Technology Shanghai Co ltd filed Critical Yida Technology Shanghai Co ltd
Priority to CN202111463175.2A priority Critical patent/CN114120307A/en
Publication of CN114120307A publication Critical patent/CN114120307A/en
Pending legal-status Critical Current

Links

Images

Abstract

The application relates to the technical field of image processing and provides a method, a device, equipment and a storage medium for identifying display content, wherein the method comprises the steps of acquiring an acquired image to be identified; the image to be identified is an image formed by acquiring display equipment at a certain time; selecting a display screen area as an image target area in an image to be identified based on a preset image area identification template; and identifying the image target area based on a preset content identification algorithm to obtain display content. The method can improve the integrity and accuracy of the identification of the display content in the display screen.

Description

Display content identification method, device, equipment and storage medium
Technical Field
The present application relates to the field of image recognition technologies, and in particular, to a method, an apparatus, a device, and a storage medium for recognizing display content.
Background
In recent years, with the maturity of technology, electronic display screens are increasingly applied in the fields of media, unionpay and the like. Electronic displays are commonly used to display relevant content, for example in the Unionpay field, and ciphers (e.g., Ushield) with LCD screens are commonly used to provide dynamic ciphers. However, in practical applications, a fault may occur, which causes the actual display content to be inconsistent with the preset display content, and it is very important to detect and identify the display content.
At present, a high-speed shooting instrument is generally adopted to shoot an electronic display screen, then a display area of the electronic display screen is identified from a shot picture, and character identification is carried out on the display area, so that display content is obtained. However, in the process of picture taking, when ambient light interferes the electronic display screen, the taken picture cannot well identify the display area of the electronic display screen, and the problems of incomplete identification of the display content in the display area of the electronic display screen, error or fuzzy content display and the like can be caused.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, a device, and a storage medium for identifying display content, which can improve the integrity and accuracy of identifying display content in a display screen.
In a first aspect, an embodiment of the present application provides a method for identifying display content, where the method includes:
acquiring an acquired image to be identified; the image to be identified is an image formed by collecting display equipment;
selecting a display screen area as an image target area in the image to be identified based on a preset image area identification template;
and identifying the image target area based on a preset content identification algorithm to obtain display content.
In a second aspect, an embodiment of the present application provides an apparatus for identifying display content, where the apparatus includes:
the image to be identified acquisition module is used for acquiring the acquired image to be identified; the image to be identified is an image formed by collecting display equipment;
the image target area selection module is used for selecting a display screen area as an image target area in the image to be identified based on a preset image area identification template;
and the display content identification module is used for identifying the image target area based on a preset content identification algorithm so as to obtain display content.
In a third aspect, an embodiment of the present application provides a terminal device, including: a memory; one or more processors coupled with the memory; one or more application programs, wherein the one or more application programs are stored in the memory and configured to be executed by the one or more processors, the one or more application programs being configured to perform the method for identifying display content as provided by the first aspect above.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a program code is stored in the computer-readable storage medium, and the program code may be called by a processor to execute the method for identifying display content provided in the first aspect.
Compared with the prior art, in the scheme provided by the embodiment of the application, the image to be recognized is recognized by adopting the preset image area recognition template, and the display screen area in the image to be recognized is selected as the image target area; and then, a preset content identification algorithm is adopted to identify the image target area, so that the display content can be obtained. Compared with the existing method of directly adopting image recognition (such as recognition methods of a neural network and the like), the method for recognizing the display screen area by adopting the preset image area recognition template has the advantages that the problem that the recognized display screen area is inaccurate due to the influence of the environment such as light during the collection of the image to be recognized is solved; the method can accurately and quickly determine the display screen area, and because the display screen area is used for displaying the content such as characters and the like, the interference of other parts (such as a shell of a display) and the like can be eliminated by determining the display screen area, so that the completeness and the accuracy of the display content identification in the display screen are improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly introduced below, it is obvious that the drawings in the following description are only embodiments of the present application, and for those skilled in the art, other drawings can be obtained according to the provided drawings without creative efforts.
Fig. 1 is a schematic view of an application scenario of a display content identification method according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a display content identification method according to an embodiment of the present application;
FIG. 3 is a schematic diagram of a display device (i.e., a scrambler) provided in one embodiment of the present application;
FIG. 4 is a schematic diagram of an image target area provided in one embodiment of the present application;
fig. 5 is a block diagram of an apparatus for identifying display contents according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of a terminal device provided in an embodiment of the present application;
fig. 7 is a schematic structural diagram of a computer-readable storage medium provided in an embodiment of the present application.
Detailed Description
The terms "first," "second," and the like in the description and in the claims of the embodiments of the application and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It will be appreciated that the data so used may be interchanged under appropriate circumstances such that the embodiments described herein may be practiced otherwise than as specifically illustrated or described herein. Furthermore, the terms "comprise" and "have," and any variations thereof, are intended to cover non-exclusive inclusions, such that a process, method, system, article, or apparatus that comprises a list of steps or modules is not necessarily limited to those steps or modules expressly listed, but may include other steps or modules not expressly listed or inherent to such process, method, article, or apparatus, such that the division of modules presented in the present application is merely a logical division and may be implemented in a practical application in a different manner, such that multiple modules may be combined or integrated into another system or some features may be omitted or not implemented, and such that couplings or direct couplings or communicative connections shown or discussed may be through interfaces, indirect couplings or communicative connections between modules may be electrical or the like, the embodiments of the present application are not limited. Moreover, the modules or sub-modules described as separate components may or may not be physically separated, may or may not be physical modules, or may be distributed in a plurality of circuit modules, and some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiments of the present application.
The technical solutions in the embodiments of the present application will be described clearly and completely below, and it should be understood that the described embodiments are only a part of the embodiments of the present application, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present application.
In order to explain the present application in more detail, a method, an apparatus, a terminal device and a computer storage medium for identifying display content provided by the present application are specifically described below with reference to the accompanying drawings.
Referring to fig. 1, fig. 1 is a schematic diagram illustrating an application scenario of the identification method for display content according to the embodiment of the present application, where the application scenario includes a terminal device 100 according to the embodiment of the present application, and the terminal device 100 may be various electronic devices (such as structure diagrams of 102, 104, 106, and 108) having a display screen.
It should be noted that the terminal device 100 according to the embodiments of the present application may be a device providing voice and/or data connectivity to a user, a handheld device having a wireless connection function, or other processing device connected to a wireless modem. A wireless terminal, which may be a mobile terminal such as a mobile phone (or a "cellular" phone) and a computer having a mobile terminal, for example, a portable, pocket, hand-held, computer-included or vehicle-mounted mobile device, may communicate with one or more core networks via a Radio Access Network (RAN). Examples of such devices include Personal Communication Service (PCS) phones, cordless phones, Session Initiation Protocol (SIP) phones, Wireless Local Loop (WLL) stations, and Personal Digital Assistants (PDA). A wireless Terminal may also be referred to as a system, a Subscriber Unit (Subscriber Unit), a Subscriber Station (Subscriber Station), a Mobile Station (Mobile), a Remote Station (Remote Station), an Access Point (Access Point), a Remote Terminal (Remote Terminal), an Access Terminal (Access Terminal), a User Terminal (User Terminal), a Terminal Device, a User Agent (User Agent), a User Device (User Device), or a User Equipment (User Equipment).
Those skilled in the art will appreciate that the number of terminal devices described above may be greater or fewer. For example, the number of the terminal devices may be only a few, or the number of the terminal devices may be tens of or hundreds, or may be more, and the number and the type of the terminal devices are not limited in the embodiment of the present application. The terminal device 100 may be used to execute a display content identification method provided in the embodiments of the present application.
In an optional implementation manner, the application scenario may include a server in addition to the terminal device 100 provided in the embodiment of the present application, where a network is disposed between the server and the terminal device. Networks are used as the medium for providing communication links between terminal devices and servers. The network may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few.
It should be understood that the number of terminal devices, networks, and servers are merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, the server may be a server cluster composed of a plurality of servers. Wherein, the terminal device interacts with the server through the network to receive or send messages and the like. The server may be a server that provides various services. Wherein the server may be configured to perform the steps of a method for identifying display content provided in the embodiments of the present application. In addition, when the terminal device executes the method for identifying the display content provided in the embodiment of the present application, a part of the steps may be executed at the terminal device, and a part of the steps may be executed at the server, which is not limited herein.
In another optional implementation manner, the application scenario includes that besides the terminal device 100 provided in this embodiment, an image capture device may also be used to capture and capture an image of a display device, so as to form an image to be recognized. In addition, the image acquisition device may communicate with the terminal device, and transmit the image to be recognized to the terminal device 100, so that the terminal device 100 performs a recognition method of the display content on the image to be recognized, thereby obtaining the recognition content.
Based on this, the embodiment of the application provides a display content identification method. Referring to fig. 2, fig. 2 is a schematic flowchart illustrating a method for identifying display content according to an embodiment of the present application, and taking the method applied to the terminal device 100 in fig. 1 as an example to explain the method, the method includes the following steps:
and step S110, acquiring the acquired image to be identified.
Wherein the image to be recognized is an image formed by capturing the display device.
In this embodiment, a display device refers to a device having at least one display screen, and the display screen can display or play content, such as text, animation, pictures, video, and the like. The display device may be a scrambler (as shown in fig. 3), a billboard, a digital clock, an LED display, etc.
The display device may be used to display some content (e.g., promotional articles, transaction passwords, etc.) for viewing or use by the relevant person. However, in practical applications, there is a situation where the actual display content of the display device does not match the preset display content, and at this time, the actual display content needs to be updated. For example, on some special festivals (e.g., national festivals), the display device needs to display a preset blessing word "celebrate national festivals", but the actual display content of the display device is "10/1/2021, and the weather is fine", so that the actual display content of the display device does not conform to the preset display content at this time, and the display device needs to be updated. Or for the cipher device, when the network transaction needs the dynamic cipher, the dynamic cipher displayed by the cipher device can be identified, on one hand, the network transaction can be completed by adopting the identified dynamic cipher; on the other hand, whether the dynamic password is effectively updated or not can be determined according to the comparison between the dynamic password at the current moment and the dynamic password at the historical moment, so that whether the password device has a fault or not can be judged.
Based on this, when the display content of the cipher device needs to be judged, the image acquisition device can be adopted to acquire or shoot a picture containing the cipher device so as to form an image to be identified.
And step S120, selecting a display screen area as an image target area in the image to be identified based on a preset image area identification template.
The method comprises the steps that a preset image area identification template is used for selecting a display screen area in an image to be identified; may be selection parameters for some display screen area including, but not limited to, area location (e.g., coordinate points), size, etc. Optionally, the preset image area recognition template is obtained by analyzing a historical display image, the historical display image is an image of a display device acquired in a past period of time, and the historical display image and the image to be recognized are images which are acquired at the same shooting angle and are directed to the same display device. For example, if the image to be recognized is an image of the scrambler a (see fig. 3), the display image of the history is also an image of the scrambler a.
It should be noted that the display screen area may be an area including the entire display screen in the display device (i.e., an area formed by a housing of the display device, etc.); or the area occupied by the whole display content in the display screen can be larger than or equal to. The display screen area is selected as an image target area (please refer to fig. 4), so that the image target area includes complete display content, and the image target area is identified to identify the complete display content, thereby ensuring the accuracy and integrity of identification.
Further, a specific embodiment of the preset image region identification template is given, and is described as follows:
in one embodiment, the preset image region identification template is established by a method comprising the following steps (1) - (4):
(1) a plurality of display images acquired over a period of time are acquired. The display image and the image to be identified are the images which are collected at the same shooting angle and are aimed at the same display device.
In particular, multiple display images acquired over a period of time may be acquired. Wherein a period of time may be a time window.
In some embodiments, the multiple display images may be grayscale images, but also color images, such as RGB images, HSV images, or HLS images. Where RGB is the most frequently used color space, and an image is represented by three channels, red (R), green (G), and blue (B), respectively. Different combinations of these three colors can form almost all other colors.
The way of HSV expressing color images consists of three parts: hue, Saturation, color purity, and Value. The HSV color space is usually represented by a space cylinder, the cross section of the cylinder can be regarded as a polar coordinate system, H is represented by a polar angle of the polar coordinate, S is represented by a polar axis length of the polar coordinate, and V is represented by a height of a central axis of the cylinder. HSV can intuitively express the hue, vividness and brightness of a color, and facilitates color contrast, and is therefore commonly used in image processing.
HLS also has three components, Hue, Saturation, and brightness. The spatial cylinder is also used to represent the HLS color space. Here, the L component in HLS is luminance, which is 100, indicating white, and luminance which is 0, indicating black.
(2) And carrying out comparative analysis on the plurality of display images to find out the area with significant pixel change in each display image.
In particular, since the time of capturing or capturing each image is different, and the display content in the display device is usually dynamically displayed (e.g. dynamic password of the password device) or updated in a period of time, the content displayed in different images may be changed, i.e. the display content in different images may be different, and then some pixels of the display area in different images may be changed significantly. For example, the display content of the first display image is 123456, the display content of the second display image is 350882, and the pixels corresponding to the same display area are different due to the difference in the numbers displayed in the first display image and the second display image, so that the area with significantly changed pixels can be determined by comparing the two images.
In some embodiments, in step (2), performing a comparative analysis on the plurality of display images to find a region of significant pixel change in each display image includes: comparing pixels at corresponding positions of a plurality of display images based on the HSV color space; and recording a communication area formed by all pixels of which the brightness change values of the pixels exceed a preset threshold as a pixel significant change area.
Specifically, for any one display image, the brightness of the display image can be compared with the brightness of the pixel at the corresponding position of each of the rest display images in the HSV channel, a brightness change value is calculated, the pixels with the brightness change value exceeding a preset threshold value form a communicated pixel area, and the communicated pixel area is marked as a pixel significant change area.
The HSV color space can visually express the hue, the brightness and the brightness of the color in the image, so that the color can be conveniently compared. And is closer to the perception experience of people on color than the RGB image, so the HSV channel brightness comparison method can be used for more accurately determining the area with the significant change of the pixel in the embodiment. In addition, the HSV channel brightness comparison method can directly process the color image, namely can directly process the display image, does not need to convert the display image from the color image into gray scale firstly and then process the display image, reduces the processing process and can improve the efficiency of image processing.
It should be noted that the preset threshold is a preset value, and in this embodiment, may be a proportional value. The value of the preset threshold is not fixed, and related personnel can set the threshold according to actual requirements. In a preferred embodiment, the preset threshold may be 20%.
In a possible design, before comparing the pixels at the corresponding positions of the multiple display images based on the HSV color space, the method further includes: when the plurality of display images are RGB images, the RGB images are converted into HSV images.
Specifically, if HSV channel luminance comparison is to be used to determine the regions of significant pixel variation for each display image, then the display images used need to be HSV images. If the acquired display image is an RGB image, the RGB image needs to be converted into an HSV image.
Since the RGB color space is suitable for display systems, the display device image captured by the image capture device is also typically an RGB image. The RG image needs to be converted into an HSV image before performing the HSV channel luminance comparison method.
In some embodiments, when the pixel in the display image has a significant change region, the gray-scale change values of the pixels at the corresponding positions of the multiple display images may be compared, and then the pixel with the gray-scale change value exceeding the preset threshold value is selected to form the pixel significant change region in the display image with the connected pixel region.
(3) And carrying out extension according to a preset proportion on the outer boundary of each pixel significant change area, and carrying out edge identification on each extended pixel significant change area to obtain the display area of each display image.
Specifically, the region with significantly changed pixels is usually the region of the display content in the display screen, but in practical applications, there may be a situation where part of the content has not changed all the time, and then the luminance values of the pixels in the region with unchanged content in a plurality of display images are usually unchanged or slightly changed (i.e. the region with insignificant pixel change), and this part of the region is easily lost or ignored when selecting the region with significantly changed pixels, which may result in a small recognition template of the preset image region, further result in the target region of the selected image not including the completed display content, and finally result in the lack of the recognition of the display content in the display screen. In view of this, after obtaining the significant variation region of each pixel, the significant variation region of each pixel is subjected to an extension or an extension process, that is, a display region is enlarged.
Next, embodiments of the significantly changed region of the epi-extension or extended pixel are also given, and detailed descriptions are as follows:
in one embodiment, extending the outer boundary of each pixel significant change region according to a preset proportion, and performing edge recognition on each extended pixel significant change region to obtain the display region of each display image includes: carrying out similar pixel outward expansion on the outer boundary of each pixel significant change area according to a preset proportion; and carrying out edge identification on the expanded outer boundary, and cutting along the identified expanded outer boundary to obtain a display area.
Specifically, for each pixel significant change area, the outer boundary thereof may be determined first, and then similar pixel expansion is performed on the outer boundary according to a preset proportion to obtain an expanded outer boundary; performing edge identification on the expanded outer boundary to obtain a display area; the display area is then cut out of the entire display image. Wherein, when the edge identification is carried out on the extended outer boundary, an edge detection method can be adopted.
It should be noted that the preset ratio is a preset value. The value of the preset proportion is not fixed, and related personnel can set according to actual requirements. In a preferred embodiment, the preset threshold may be 10%.
By adopting the extension method of each pixel significant change area, each corresponding display area can be accurately obtained, and further, the preset image area identification template formed according to each corresponding display area is more accurate.
(4) And forming a preset image area identification template based on the display area of each display image.
After the display area of each display image is obtained, the preset image area identification template can be determined according to a plurality of display areas. Specifically, the plurality of display areas may be analyzed, and the display area having the highest degree of repetition with the other display areas and the largest size may be selected as the image area recognition template.
Further, an embodiment of determining the preset image area identification template is also provided, and the detailed description is as follows:
in some embodiments, forming the preset image area identification template based on the display area of each display image includes: performing cluster analysis on each display area; and determining a preset image area identification template according to the clustering result.
Specifically, a clustering method can be adopted to perform clustering analysis on each display area, and the categories corresponding to the largest number of display areas are screened out as candidate categories according to a clustering result; and selecting the display area with the highest repetition degree with other display areas from the candidate categories and the largest size as an image area identification template. By adopting the clustering mode, the corresponding display area with higher similarity can be quickly selected, and the corresponding display area with low similarity is excluded, so that the efficiency of determining the preset image area identification template is improved.
Step S130, identifying the image target area based on a preset content identification algorithm to obtain display content.
After the target area is acquired, the image target area can be identified, so that the display content can be acquired.
In one embodiment, in the step S130, the identifying the image target area based on the preset content identification algorithm to obtain the display content includes: and recognizing the image target area by adopting an OCR recognition method to obtain the display content.
When the display content of the image target area is recognized, an OCR recognition method may be adopted. OCR (Optical Character Recognition) refers to a process in which an electronic device (e.g., a scanner or a digital camera) checks a Character printed on paper, determines its shape by detecting dark and light patterns, and then translates the shape into a computer text by a Character Recognition method; the method is characterized in that characters in a paper document are converted into an image file with a black-white dot matrix in an optical mode aiming at print characters, and the characters in the image are converted into a text format through recognition software for further editing and processing by word processing software.
In addition, before the OCR recognition method is performed on the image target area, an image binarization algorithm may be used for processing the image target area. The binarization of the image is to set the gray value of a pixel point on the image to be 0 or 255, that is, the whole image has an obvious visual effect of only black and white, so that convenience is provided for the identification of subsequent display contents.
The display contents may be characters, patterns, and the like. Wherein the further display content can be used in the following application scenarios:
(a) displaying specific content for a specific time period
Whether the characters are preset display contents in a preset time period can be detected, if not, a prompt message is sent to prompt display errors or display faults, and the background can update the preset display contents in time.
For example, if the current time period is a certain festival, the preset display content is a blessing message, but the preset display content is displayed as a slogan in the normal time period, and therefore, the display content needs to be updated. For another example, in the field of LED displays, LEDs display preset display contents, such as blessing words, but the display is incomplete, and pixel regions where the display is incomplete are identified, and fault information is output and reported, so as to facilitate timely maintenance. The fault information includes information on the location of the faulty LED in the array.
(b) And acquiring current hot spot data, wherein the hot spot data comprises news, activity information and the like. And after processing the hot spot data, transmitting the hot spot data to a display screen for displaying within a period of time.
After the display content of the display screen is identified, recording the display content, and zooming and displaying on other equipment; or the real-time rebroadcasting is carried out after the communication connection with the display screen, and the zooming display is carried out on other equipment.
(c) Font samples as training models
The font of the character can be identified, and the character is converted into a plurality of target characters of a plurality of fonts. The multiple target characters and the characters are used as a training sample, and the training sample is input into a model for training, so that the model has a specific function of identifying the characters of multiple fonts from multiple digital display screens, the sample of each font is not required to be found, and rich and comprehensive training samples can be obtained quickly.
(d) The characters may be automatically filled into a verification page to log onto a unionpay related system or to complete a payment.
Compared with the prior art, in the scheme provided by the embodiment of the application, the image to be recognized is recognized by adopting the preset image area recognition template, and the display screen area in the image to be recognized is selected as the image target area; and then, a preset content identification algorithm is adopted to identify the image target area, so that the display content can be obtained. Compared with the existing method of directly adopting image recognition (such as recognition methods of a neural network and the like), the method for recognizing the display screen area by adopting the preset image area recognition template has the advantages that the problem that the recognized display screen area is inaccurate due to the influence of the environment such as light during the collection of the image to be recognized is solved; the method can accurately and quickly determine the display screen area, and because the display screen area is used for displaying the content such as characters and the like, the interference of other parts (such as a shell of a display) and the like can be eliminated by determining the display screen area, so that the completeness and the accuracy of the display content identification in the display screen are improved.
Further, an embodiment of the present application further provides a method for performing color level correction on a display image, which includes the following specific processes:
in one embodiment, before performing the comparative analysis on the plurality of display images, the method further includes: calculating the color difference of the allelic pixels of a plurality of display images; determining a color correction coefficient according to the allelic pixel color difference; and carrying out color level correction on the display image according to the color difference correction coefficient.
In some embodiments, if there is ambient light interference, a color difference correction coefficient may be obtained by using a standard background color difference, and a display image with a large overall deviation may be subjected to color level correction to reduce interference caused by ambient light variation. Therefore, in the present embodiment, the allelic color difference of the multiple display images is calculated; determining a color correction coefficient according to the allelic pixel color difference; and carrying out color level correction according to the color difference correction coefficient display image.
In some embodiments, when the display image is subjected to color level correction, the image with larger color level deviation can be corrected, and the image with smaller color level deviation can not be corrected, so that on one hand, the interference of ambient light and the like on the display image can be reduced, and the formed preset image area identification template is more accurate; on the other hand, the image with small color level deviation is not corrected, so that the image processing speed can be improved.
In other embodiments, when the display image is subjected to the tone scale correction, the tone scale correction may be performed on both the image having a large tone scale deviation and the image having a small tone scale deviation. By adopting the method, the interference of ambient light and the like to the display image can be reduced to the maximum extent, and the accuracy of the preset image area identification template is further improved.
It should be understood that, although the steps in the flowchart of fig. 2 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a portion of the steps in fig. 2 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performance of the sub-steps or stages is not necessarily sequential, but may be performed in turn or alternately with other steps or at least a portion of the sub-steps or stages of other steps.
The embodiment of the present disclosure describes a method for identifying display content in detail, and the method of the present disclosure can be implemented by various types of devices, so the present disclosure also discloses an apparatus for identifying display content corresponding to the method, and the following provides a detailed description of specific embodiments.
Please refer to fig. 5, which is a display content identification apparatus disclosed in an embodiment of the present application, and the apparatus mainly includes:
an image to be recognized acquisition module 510, configured to acquire an acquired image to be recognized; the image to be identified is an image formed by collecting display equipment;
an image target area selection module 520, configured to select a display screen area in the image to be identified as an image target area based on a preset image area identification template;
and a display content identification module 530, configured to identify the image target area based on a preset content identification algorithm to obtain the display content.
In one embodiment, the apparatus further comprises:
the display image acquisition module is used for acquiring a plurality of display images acquired within a period of time, wherein the display images and the images to be identified are the images which are acquired at the same shooting angle and are directed at the same display equipment.
And the change area searching module is used for carrying out comparative analysis on the plurality of display images and finding out the pixel significant change area in each display image.
And the display area obtaining module is used for extending the outer boundary of each pixel significant change area according to a preset proportion, and carrying out edge identification on each extended pixel significant change area, namely the display area of each display image.
And the identification template establishing module is used for forming a preset image area identification template based on the display area of each display image.
In one embodiment, the variable region searching module is configured to compare pixels at corresponding positions of a plurality of display images based on the HSV color space; and recording a communication area formed by all pixels of which the brightness change values of the pixels exceed a preset threshold as a pixel significant change area.
In one embodiment, the display area obtaining module is configured to perform outward expansion of similar pixels on an outer boundary of each pixel significant change area according to a preset proportion; and carrying out edge identification on the expanded outer boundary, and cutting along the identified expanded outer boundary to obtain a display area.
In one embodiment, the identification template establishing module is used for performing cluster analysis on each display area; and determining a preset image area identification template according to the clustering result.
In one embodiment, the apparatus further comprises:
and the color difference calculating module is used for calculating the allelic pixel color differences of the multiple display images.
And the correction coefficient determining module is used for determining a color correction coefficient according to the allelic pixel color difference.
And the image color level correction module is used for performing color level correction on the display image according to the color difference correction coefficient.
In one embodiment, the apparatus further comprises:
and the image conversion module is used for converting the RGB images into HSV images when the plurality of display images are the RGB images.
In one embodiment, the display content recognition module 530 is configured to recognize the image target area by using an OCR recognition method to obtain the display content.
For specific definition of the identification means of the display content, reference may be made to the above definition of the method, which is not described in detail herein. The various modules in the above-described apparatus may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent of a processor in the terminal device, and can also be stored in a memory in the terminal device in a software form, so that the processor can call and execute operations corresponding to the modules.
Referring to fig. 6, fig. 6 is a block diagram illustrating a structure of a terminal device according to an embodiment of the present application. The terminal device 60 may be a computer device. The terminal device 60 in the present application may include one or more of the following components: a processor 62, a memory 64, and one or more applications, wherein the one or more applications may be stored in the memory 64 and configured to be executed by the one or more processors 62, the one or more applications configured to perform the methods described in the above-described method embodiments of identifying display content.
Processor 62 may include one or more processing cores. The processor 62 connects various parts within the overall terminal device 60 using various interfaces and lines, and performs various functions of the terminal device 60 and processes data by executing or executing instructions, programs, code sets, or instruction sets stored in the memory 64, and calling data stored in the memory 64. Alternatively, the processor 62 may be implemented in hardware using at least one of Digital Signal Processing (DSP), Field-Programmable Gate Array (FPGA), and Programmable Logic Array (PLA). The processor 62 may be integrated with one or a combination of a Central Processing Unit (CPU), a Graphic Processing Unit (GPU), a modem, and the like. Wherein, the CPU mainly processes an operating system, a user interface, an application program and the like; the GPU is used for rendering and drawing display content; the modem is used to handle wireless communications. It is understood that the modem may be implemented by a communication chip without being integrated into the processor 62.
The Memory 64 may include a Random Access Memory (RAM) or a Read-Only Memory (Read-Only Memory). The memory 64 may be used to store instructions, programs, code, sets of codes, or sets of instructions. The memory 64 may include a stored program area and a stored data area, wherein the stored program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playing function, an image playing function, etc.), instructions for implementing various method embodiments described below, and the like. The storage data area may also store data created by the terminal device 60 in use, and the like.
Those skilled in the art will appreciate that the structure shown in fig. 6 is a block diagram of only a portion of the structure associated with the present application, and does not constitute a limitation on the terminal device to which the present application applies, and that a particular terminal device may include more or less components than those shown, or combine certain components, or have a different arrangement of components.
In summary, the terminal device provided in the embodiment of the present application is used to implement the method for identifying the corresponding display content in the foregoing method embodiment, and has the beneficial effects of the corresponding method embodiment, which are not described herein again.
Referring to fig. 7, a block diagram of a computer-readable storage medium according to an embodiment of the present disclosure is shown. The computer-readable storage medium 70 stores program codes that can be called by a processor to execute the methods described in the above embodiments of the identification method for display contents.
The computer-readable storage medium 70 may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read only memory), an EPROM, a hard disk, or a ROM. Alternatively, the computer-readable storage medium 70 includes a non-transitory computer-readable storage medium. The computer readable storage medium 70 has storage space for program code 72 for performing any of the method steps of the method described above. The program code can be read from or written to one or more computer program products. The program code 72 may be compressed, for example, in a suitable form.
In the description herein, reference to the description of the term "one embodiment," "some embodiments," "an example," "a specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to refer to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, various embodiments or examples and features of different embodiments or examples described in this specification can be combined and combined by one skilled in the art without contradiction.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the application. Thus, the present application is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (11)

1. A method for identifying display content, the method comprising:
acquiring an acquired image to be identified; the image to be identified is an image formed by collecting display equipment;
selecting a display screen area as an image target area in the image to be identified based on a preset image area identification template;
and identifying the image target area based on a preset content identification algorithm to obtain display content.
2. The method according to claim 1, wherein the preset image area identification template is established by:
acquiring a plurality of display images acquired within a period of time, wherein the display images and the image to be identified are images which are acquired at the same shooting angle and are directed at the same display device;
carrying out comparative analysis on a plurality of display images to find out a pixel significant change area in each display image;
extending the outer boundary of each pixel significant change area according to a preset proportion, and carrying out edge identification on each extended pixel significant change area to obtain a display area of each display image;
and forming the preset image area identification template based on the display area of each display image.
3. The method of claim 2, wherein the performing a comparative analysis on the plurality of display images to find regions of significant pixel change in each of the display images comprises:
comparing pixels at corresponding positions of a plurality of display images based on the HSV color space;
and recording a communication area formed by all pixels of which the brightness change values of the pixels exceed a preset threshold as a pixel significant change area.
4. The method of claim 2, wherein extending the outer boundary of each of the pixel significant change regions according to a preset ratio, and performing edge recognition on each of the extended pixel significant change regions to obtain the display region of each display image comprises:
carrying out similar pixel outward expansion on the outer boundary of each pixel significant change area according to a preset proportion;
and performing edge identification on the expanded outer boundary, and cutting along the identified expanded outer boundary to obtain the display area.
5. The method according to claim 2, wherein the forming the preset image area identification template based on the display area of each display image comprises:
performing cluster analysis on each display area;
and determining the preset image area identification template according to the clustering result.
6. The method of any of claims 2-5, wherein prior to performing the comparative analysis on the plurality of display images, further comprising:
calculating the allelic pixel color difference of a plurality of display images;
determining a color correction coefficient according to the allelic pixel color difference;
and carrying out color level correction on the display image according to the color difference correction coefficient.
7. The method of claim 3, wherein before comparing the pixels at the corresponding positions of the plurality of display images based on the HSV color space, further comprising:
when the display images are RGB images, converting the RGB images into HSV images.
8. The method according to any one of claims 1 to 5, wherein the identifying the image target area based on a preset content identification algorithm to obtain the display content comprises:
and recognizing the image target area by adopting an OCR recognition method to obtain display content.
9. An apparatus for identifying display content, the apparatus comprising:
the image to be identified acquisition module is used for acquiring the acquired image to be identified; the image to be identified is an image formed by collecting display equipment;
the image target area selection module is used for selecting a display screen area as an image target area in the image to be identified based on a preset image area identification template;
and the display content identification module is used for identifying the image target area based on a preset content identification algorithm so as to obtain display content.
10. A terminal device, comprising:
a memory; one or more processors coupled with the memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, the one or more applications configured to perform the method of any of claims 1-8.
11. A computer-readable storage medium, having stored thereon program code that can be invoked by a processor to perform the method according to any one of claims 1 to 8.
CN202111463175.2A 2021-12-02 2021-12-02 Display content identification method, device, equipment and storage medium Pending CN114120307A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111463175.2A CN114120307A (en) 2021-12-02 2021-12-02 Display content identification method, device, equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111463175.2A CN114120307A (en) 2021-12-02 2021-12-02 Display content identification method, device, equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114120307A true CN114120307A (en) 2022-03-01

Family

ID=80366244

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111463175.2A Pending CN114120307A (en) 2021-12-02 2021-12-02 Display content identification method, device, equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114120307A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114897478A (en) * 2022-06-06 2022-08-12 壹沓科技(上海)有限公司 Data processing method, device, equipment and storage medium
CN115033822A (en) * 2022-06-14 2022-09-09 壹沓科技(上海)有限公司 Element positioning method, device and equipment and readable storage medium
CN115311167A (en) * 2022-08-24 2022-11-08 深圳新视光电科技有限公司 Color gamut control method, device and equipment based on multicolor light and storage medium

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114897478A (en) * 2022-06-06 2022-08-12 壹沓科技(上海)有限公司 Data processing method, device, equipment and storage medium
CN114897478B (en) * 2022-06-06 2023-12-22 壹沓科技(上海)有限公司 Data processing method, device, equipment and storage medium
CN115033822A (en) * 2022-06-14 2022-09-09 壹沓科技(上海)有限公司 Element positioning method, device and equipment and readable storage medium
CN115311167A (en) * 2022-08-24 2022-11-08 深圳新视光电科技有限公司 Color gamut control method, device and equipment based on multicolor light and storage medium
CN115311167B (en) * 2022-08-24 2023-04-04 深圳新视光电科技有限公司 Color gamut control method, device and equipment based on multicolor light and storage medium

Similar Documents

Publication Publication Date Title
CN114120307A (en) Display content identification method, device, equipment and storage medium
CN112162930B (en) Control identification method, related device, equipment and storage medium
CN111476780B (en) Image detection method and device, electronic equipment and storage medium
US9524028B2 (en) Visual language for human computer interfaces
JP4016342B2 (en) Apparatus and method for code recognition
WO2019169772A1 (en) Picture processing method, electronic apparatus, and storage medium
US8988543B2 (en) Camera based method for text input and keyword detection
US9159143B2 (en) Apparatus and method for generating character collage message
CN108564079B (en) Portable character recognition device and method
CN113344901A (en) Gluing defect detection method and device, storage medium and electronic equipment
US8315460B2 (en) Method for recognizing text from image
US11889083B2 (en) Image display method and device, image recognition method and device, storage medium, electronic apparatus, and image system
JP2010211498A (en) Image processing program and image processing system
CN112418214A (en) Vehicle identification code identification method and device, electronic equipment and storage medium
JP2008067321A (en) Data registration management apparatus
CN103854020A (en) Character recognition method and device
CN110310341B (en) Method, device, equipment and storage medium for generating default parameters in color algorithm
CN110363092B (en) Histogram identification method, apparatus, device and computer readable storage medium
CN110912801B (en) Method, system and terminal device for detecting electronic red packet
CN110781811A (en) Abnormal work order identification method and device, readable storage medium and computer equipment
CN109141457A (en) Navigate appraisal procedure, device, computer equipment and storage medium
CN114926829A (en) Certificate detection method and device, electronic equipment and storage medium
US20060257003A1 (en) Method for the automatic identification of entities in a digital image
CN114429464A (en) Screen-breaking identification method of terminal and related equipment
JP4312185B2 (en) Game mat, card game system, image analysis apparatus, and image analysis method

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