CN107067392B - Method and device for identifying screen-patterned image - Google Patents

Method and device for identifying screen-patterned image Download PDF

Info

Publication number
CN107067392B
CN107067392B CN201710233998.3A CN201710233998A CN107067392B CN 107067392 B CN107067392 B CN 107067392B CN 201710233998 A CN201710233998 A CN 201710233998A CN 107067392 B CN107067392 B CN 107067392B
Authority
CN
China
Prior art keywords
image
gray
horizontal projection
curve
sum
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.)
Active
Application number
CN201710233998.3A
Other languages
Chinese (zh)
Other versions
CN107067392A (en
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201710233998.3A priority Critical patent/CN107067392B/en
Publication of CN107067392A publication Critical patent/CN107067392A/en
Application granted granted Critical
Publication of CN107067392B publication Critical patent/CN107067392B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/0002Inspection of images, e.g. flaw detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20212Image combination
    • G06T2207/20216Image averaging

Landscapes

  • Engineering & Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Controls And Circuits For Display Device (AREA)
  • Image Processing (AREA)

Abstract

The disclosure relates to a method and a device for identifying a flower screen image. The method takes into account the characteristics of the screen-splash image: the method comprises the steps of judging whether the content of a single image has periodicity or not, if so, judging that the single image has the characteristic of a screen image, and judging that the single image is the screen image. The method utilizes a single image to complete the identification of whether the single image is the flower screen image, and is convenient and quick.

Description

Method and device for identifying screen-patterned image
Technical Field
The present disclosure relates to the field of image processing technologies, and in particular, to a method and an apparatus for identifying a screen splash image.
Background
EXIF (Exchangeable Image File format) is a standard File format promoted by japan electronics industry development association, and may be added to Image File formats such as JPEG, TIFF, RIFF, and RAW to add photographic data and thumbnail data.
The thumbnail can be obtained by using the thumbnail data, compared with the original image, the thumbnail occupies a smaller space and is loaded at a higher speed, and a user can know the content of the original image by browsing the thumbnail, so that the method is convenient and fast.
However, if EXIF includes an error in thumbnail data, an image obtained using the error thumbnail data is an image with an enlarged screen, and the content of the original image cannot be correctly reflected, so that it is necessary to regenerate a thumbnail from the original image.
The related art provides a method of identifying an image with a flower screen, which compares the contents of a thumbnail and the contents of an original image to identify whether the thumbnail is the image with the flower screen. However, this method is performed on the premise that both the thumbnail and the original image are acquired. Therefore, the applicable scenarios of this method are limited.
Disclosure of Invention
To overcome the problems in the related art, the present disclosure provides a method and apparatus for recognizing a screen-splash image.
According to a first aspect of the embodiments of the present disclosure, there is provided a method for identifying a screenful image, including:
carrying out gray level processing on a single image to obtain a corresponding gray level image;
projecting the gray level image along the horizontal direction to obtain a horizontal projection curve of the gray level image;
detecting whether the horizontal projection curve has periodicity;
when the horizontal projection curve has periodicity, determining the single image as a screen-blooming image;
wherein detecting whether the horizontal projection curve has periodicity comprises:
carrying out autocorrelation on the horizontal projection curve to obtain a corresponding autocorrelation curve;
detecting whether the autocorrelation curve has periodicity;
the detecting whether the autocorrelation curve has periodicity includes:
extracting a main peak value of the autocorrelation curve and a secondary peak value adjacent to the main peak value;
judging whether the ratio of the main peak value to the secondary peak value is in a preset range or not;
when the ratio is within the preset range, determining that the autocorrelation curve has periodicity.
Optionally, projecting the grayscale image along a horizontal direction to obtain a horizontal projection curve of the grayscale image, including:
determining the sum of gray values of all pixel points on each line of the gray image;
averaging the sum of the gray values corresponding to each line of the gray image by using the line number of the gray image;
and generating the horizontal projection curve according to the average gray value corresponding to each line of the gray image.
Optionally, the single image is a thumbnail; after determining that the single image is a screenful image, the method further comprises:
acquiring an original image corresponding to the thumbnail;
and zooming the original image to obtain an updated thumbnail.
According to a second aspect of the embodiments of the present disclosure, there is provided an apparatus for recognizing a screen-splash image, including:
the gray processing module is configured to perform gray processing on a single image to obtain a corresponding gray image;
a horizontal projection module configured to project the gray-scale image in a horizontal direction to obtain a horizontal projection curve of the gray-scale image;
a detection module configured to detect whether the horizontal projection curve has periodicity;
a determining module configured to determine that the single image is a screen-blooming image when the horizontal projection curve has periodicity;
wherein the autocorrelation submodule is configured to perform autocorrelation on the horizontal projection curve to obtain a corresponding autocorrelation curve;
a detection sub-module configured to detect whether the autocorrelation curve has periodicity;
the detection submodule includes:
an extraction submodule configured to extract a main peak of the autocorrelation curve and a secondary peak adjacent to the main peak;
a judging submodule configured to judge whether a ratio of the primary peak to the secondary peak is within a preset range;
a determination submodule configured to determine that the autocorrelation curve has periodicity when the ratio is within the preset range.
Optionally, the horizontal projection module comprises:
a determining submodule configured to determine a sum of gray values of all pixel points on each line of the gray image;
the average submodule is configured to average the sum of the gray values corresponding to each row of the gray image by using the row number of the gray image;
and the generation submodule is configured to generate the horizontal projection curve according to the average gray value corresponding to each row of the gray image.
Optionally, the single image is a thumbnail; the device further comprises:
the obtaining module is configured to obtain an original image corresponding to the thumbnail after the single image is determined to be the screen-blooming image;
a scaling module configured to scale the original image to obtain an updated thumbnail.
According to a third aspect of embodiments of the present disclosure, there is provided a non-transitory computer-readable storage medium having instructions therein, which when executed by a processor of a mobile terminal, enable the mobile terminal to perform a method of identifying an image of a splash screen, the method comprising:
carrying out gray level processing on a single image to obtain a corresponding gray level image;
projecting the gray level image along the horizontal direction to obtain a horizontal projection curve of the gray level image;
detecting whether the horizontal projection curve has periodicity;
when the horizontal projection curve has periodicity, determining the single image as a screen-blooming image;
wherein detecting whether the horizontal projection curve has periodicity comprises:
carrying out autocorrelation on the horizontal projection curve to obtain a corresponding autocorrelation curve;
detecting whether the autocorrelation curve has periodicity;
the detecting whether the autocorrelation curve has periodicity includes:
extracting a main peak value of the autocorrelation curve and a secondary peak value adjacent to the main peak value;
judging whether the ratio of the main peak value to the secondary peak value is in a preset range or not;
when the ratio is within the preset range, determining that the autocorrelation curve has periodicity.
The technical scheme provided by the embodiment of the disclosure can have the following beneficial effects:
the disclosure provides a method and a device for identifying a flower screen image. The method takes into account the characteristics of the screen-splash image: the method comprises the steps of judging whether the content of a single image has periodicity or not, if so, judging that the single image has the characteristic of a screen image, and judging that the single image is the screen image. The method utilizes a single image to complete the identification of whether the single image is the flower screen image, and is convenient and quick.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure.
FIG. 1 is a flow chart illustrating a method of identifying a screensaver image according to an exemplary embodiment.
Fig. 2A is a schematic diagram of a grayscale image obtained by performing grayscale processing on a single image.
Fig. 2B is a schematic diagram of a horizontal projection curve obtained by horizontally projecting the grayscale image shown in fig. 2A.
Fig. 2C is a schematic diagram of an autocorrelation curve obtained by autocorrelation of the horizontal projection curve shown in fig. 2B.
Fig. 3 is a flowchart illustrating a step S12 in a method of recognizing a flower screen image according to an exemplary embodiment.
Fig. 4 is a flowchart illustrating a step S13 in a method of recognizing a flower screen image according to an exemplary embodiment.
Fig. 5 is a flowchart illustrating a step S132 in a method of recognizing a flower screen image according to an exemplary embodiment.
FIG. 6 is a flow diagram illustrating a method of updating a thumbnail according to an exemplary embodiment.
Fig. 7 is a block diagram illustrating an apparatus for recognizing a screensaver image according to an exemplary embodiment.
Fig. 8 is a block diagram illustrating a horizontal projection module in an apparatus for recognizing a screen splash image according to an exemplary embodiment.
Fig. 9 is a block diagram illustrating a detection module in an apparatus for recognizing a screenful image according to an exemplary embodiment.
Fig. 10 is a block diagram illustrating a detection sub-module in an apparatus for recognizing a screenful image according to an exemplary embodiment.
Fig. 11 is a block diagram illustrating an apparatus for updating a thumbnail according to an exemplary embodiment.
Fig. 12 is a block diagram illustrating an apparatus for recognizing a screensaver image according to an exemplary embodiment.
Detailed Description
Reference will now be made in detail to the exemplary embodiments, examples of which are illustrated in the accompanying drawings. When the following description refers to the accompanying drawings, like numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the exemplary embodiments below are not intended to represent all implementations consistent with the present disclosure. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the present disclosure, as detailed in the appended claims.
The method identifies whether a single image is a screen-blooming image or not by processing the single image, and is convenient and quick. The method for identifying a screenful image provided by the present disclosure is described below with reference to the accompanying drawings.
Fig. 1 is a flowchart illustrating a method of recognizing a screensaver image, according to an exemplary embodiment, as shown in fig. 1, the method including the following steps.
In step S11, a single image is subjected to gradation processing to obtain a corresponding gradation image.
In step S12, the grayscale image is projected in the horizontal direction to obtain a horizontal projection curve of the grayscale image.
In step S13, it is detected whether the horizontal projection curve has periodicity.
In step S14, when the horizontal projection curve has periodicity, the single image is determined to be a flower screen image.
The single image generally refers to an image to be subjected to screen-splash image recognition, and may be a thumbnail, an original image, or any image designated by a user.
Considering the characteristics of the screen-splash image: the method has repeated content, judges whether the content of a single image has periodicity, if so, the single image has the characteristic of a screen-flower image, and can judge that the single image is the screen-flower image; otherwise, it may be determined that the single image is not a flower screen image.
In order to simplify the process of identifying the screen-splash image, firstly, the gray level processing is performed on a single image to obtain a corresponding gray level image. The gray image is composed of pixels with different gray values. The gray value of a pixel point in the gray image has 256 gray levels, and the gray value of any pixel point is between 0 and 255. Then, the gray values of all the pixel points forming the gray image are counted, and whether the content of the gray image is periodic or not is determined according to the counting result.
One possible statistical approach is: step S12 is executed to project the gray-scale image in the horizontal direction to obtain a horizontal projection curve of the gray-scale image. Therefore, optionally, fig. 3 is a flowchart illustrating a step S12 in a method of recognizing a screensaver image according to an exemplary embodiment, as shown in fig. 3, the step S12 includes the steps of:
in step S121, the sum of the gray values of all the pixel points on each line of the gray image is determined.
In step S122, the sum of the gray scale values corresponding to each line of the gray scale image is averaged by using the number of lines of the gray scale image.
In step S123, the horizontal projection curve is generated according to the average gray scale value corresponding to each line of the gray scale image.
The present disclosure proposes that the process of generating the horizontal projection curve of the grayscale image is as follows:
firstly, the gray values of all pixel points forming the gray image are summed line by line. Assuming that the gray-scale image has N rows and M columns, the gray-scale value of the pixel point on the nth row and the mth column is recorded as DnmSumming the gray values of all the pixel points on each row from the 1 st row of the gray image to the Nth row of the gray image, and recording the sum of the gray values of all the pixel points on the Nth row as S for convenient descriptionnThen S isn=Dn1+Dn2+……+Dnm. Wherein N is an integer of 1 to N, and M is an integer of 1 to M.
Then, the gray values of the pixel points forming the gray image are averaged line by line. The number of lines of the gray image is N, and the sum of the gray values of all the pixel points on the nth line is SnSo as to be paired with SnNormalization is carried out, i.e. SnIs divided by N to give
Figure GDA0002376391820000081
Finally, a horizontal projection curve is generated
Figure GDA0002376391820000082
Similarly, another process for generating the horizontal projection curve of the gray-scale image is as follows:
firstly, the gray values of all pixel points forming the gray image are averaged one by one. Assuming that the gray image has N rows and M columns, the gray value of each pixel point forming the gray image is averaged, and for convenience of description, the gray value of the pixel point on the nth row and the mth column is recorded as DnmThen to DnmNormalization is carried out, i.e. DnmIs divided by N to give
Figure GDA0002376391820000083
Wherein n is not less than 1 and not more thanAnd N, wherein M is an integer of 1 or more and M or less.
And then summing the normalized gray values of all the pixel points forming the gray image line by line. Since the number of the columns of the gray level image is M, the normalized gray level values of all the pixel points in each row are summed from the 1 st row of the gray level image to the Nth row of the gray level image, and for convenience of description, the sum of the normalized gray level values of all the pixel points in the N-th row is recorded as S'nThen, then
Figure GDA0002376391820000084
Wherein N is an integer of 1 to N, and M is an integer of 1 to M.
Finally, a horizontal projection curve is generated
Figure GDA0002376391820000085
After the horizontal projection curve of the gray image is obtained in step S12, step S13 is performed to detect whether the horizontal projection curve has periodicity. One possible detection method is: and carrying out autocorrelation on the projection curve to obtain a corresponding autocorrelation curve, and then judging whether the autocorrelation curve has periodicity. Therefore, optionally, fig. 4 is a flowchart illustrating a step S13 in a method of recognizing a screensaver image according to an exemplary embodiment, as shown in fig. 4, the step S13 includes the steps of:
in step S131, the horizontal projection curve is subjected to autocorrelation to obtain a corresponding autocorrelation curve.
In step S132, it is detected whether the autocorrelation curve has periodicity.
Alternatively, fig. 5 is a flowchart illustrating a step S132 of a method for recognizing a screensaver image according to an exemplary embodiment, and as shown in fig. 5, the step S132 includes the steps of:
in step S1321, a main peak of the autocorrelation curve and a secondary peak adjacent to the main peak are extracted.
In step S1322, it is determined whether a ratio of the primary peak to the secondary peak is within a preset range.
In step S1323, when the ratio is within the preset range, it is determined that the autocorrelation curve has periodicity.
The preset range is preset according to the image processing requirement or is set by the user.
Taking into account the characteristics of the autocorrelation function: the method has periodicity, the self-correlation curve corresponding to the horizontal projection curve of a single image is judged, if the self-correlation curve has periodicity, the horizontal projection curve of the single image has the self-correlation, the texture of the single image is represented to have repeatability, and therefore the single image is judged to be a screen-patterned image; otherwise, the single image is judged not to be the flower screen image.
Fig. 2A is a schematic diagram of a grayscale image obtained by performing grayscale processing on a single image. Fig. 2B is a schematic diagram of a horizontal projection curve obtained by horizontally projecting the grayscale image shown in fig. 2A. Fig. 2C is a schematic diagram of an autocorrelation curve obtained by autocorrelation of the horizontal projection curve shown in fig. 2B.
Taking a horizontal projection curve as an example, x (n) is subjected to autocorrelation, and the obtained autocorrelation curve is denoted as r (n). Then, the main peak value of R (n) is taken and recorded as M1And taking the secondary peak adjacent to the main peak on R (n), and recording as M2. Then, the ratio f of the main peak value to the secondary peak value is obtained, then
Figure GDA0002376391820000091
Assuming the preset range is greater than 0.9, f is compared to 0.9, if f is>0.9, it means that R (n) has periodicity, so that the single image is a flower screen image; conversely, it is stated that R (n) does not have periodicity, and thus the single image is not a screenful image.
And (3) periodic judgment: and (4) taking the peak value characteristic of the autocorrelation function, and comparing and judging the peak value between the middle and the two ends to obtain whether the autocorrelation function is periodic or not. During the experiment, if f is M1/M2, M1 is the middle peak value, M2 is the peak value near the middle, and if f is more than 0.9, the signal is considered to be periodic.
Optionally, for a case where a single image is a thumbnail, the present disclosure provides a method of updating the thumbnail. Fig. 6 is a flowchart illustrating a method of updating thumbnails, as shown in fig. 6, after steps S11-S14, the method further includes the steps of:
in step S15, an original image corresponding to the thumbnail is acquired;
in step S16, the original image is scaled to obtain an updated thumbnail.
For the situation that a single thumbnail is a thumbnail, after the single thumbnail is judged to be the screen-blooming image, in order to facilitate loading of a correct thumbnail later, an original image corresponding to the single thumbnail can be obtained, and then the original image is zoomed to regenerate the thumbnail.
Based on the same inventive concept, the disclosure also provides a device for identifying the flower screen image. Fig. 7 is a block diagram illustrating an apparatus for recognizing a screensaver image according to an exemplary embodiment. Referring to fig. 7, the apparatus 100 includes: a gray processing module 121, a horizontal projection module 122, a detection module 123 and a determination module 124.
The grayscale processing module 121 is configured to: carrying out gray level processing on a single image to obtain a corresponding gray level image;
the horizontal projection module 122 is configured to: projecting the gray level image along the horizontal direction to obtain a horizontal projection curve of the gray level image;
the detection module 123 is configured to: detecting whether the horizontal projection curve has periodicity;
the determination module 124 is configured to: and when the horizontal projection curve has periodicity, determining that the single image is a screen-blooming image.
Alternatively, fig. 8 is a block diagram illustrating a horizontal projection module in an apparatus for recognizing a screen image according to an exemplary embodiment. The horizontal projection module 122 includes: a determination submodule 1221, an averaging submodule 1222 and a generation submodule 1223.
The determination submodule 1221 is configured to: determining the sum of gray values of all pixel points on each line of the gray image;
averaging submodule 1222 is configured to: averaging the sum of the gray values corresponding to each line of the gray image by using the line number of the gray image;
the generation submodule 1223 is configured to: and generating the horizontal projection curve according to the average gray value corresponding to each line of the gray image.
Alternatively, fig. 9 is a block diagram illustrating a detection module in an apparatus for recognizing a screensaver image according to an exemplary embodiment. The detection module 123 includes: an autocorrelation sub-module 1231 and a detection sub-module 1232.
The autocorrelation submodule 1231 is configured to: carrying out autocorrelation on the horizontal projection curve to obtain a corresponding autocorrelation curve;
the detection submodule 1232 is configured to: detecting whether the autocorrelation curve has periodicity.
Alternatively, fig. 10 is a block diagram illustrating a detection sub-module in an apparatus for recognizing a screenful image according to an exemplary embodiment. The detection sub-module 1232 includes: an extraction sub-module 12321, a judgment sub-module 12322, and a determination sub-module 12323.
The extraction sub-module 12321 is configured to: extracting a main peak value of the autocorrelation curve and a secondary peak value adjacent to the main peak value;
the determination submodule 12322 is configured to: judging whether the ratio of the main peak value to the secondary peak value is in a preset range or not;
the determination submodule 12323 is configured to: when the ratio is within the preset range, determining that the autocorrelation curve has periodicity.
Optionally, for the case that a single image is a thumbnail, the present disclosure further provides an apparatus for updating the thumbnail. Fig. 11 is a block diagram illustrating an apparatus for updating a thumbnail according to an exemplary embodiment. The apparatus 200 includes, in addition to the gray processing module 121, the horizontal projection module 122, the detection module 123 and the determination module 124 in the apparatus shown in fig. 7: an acquisition module 125 and a scaling module 126.
The acquisition module 125 is configured to: after the single image is determined to be the screen-blooming image, acquiring an original image corresponding to the thumbnail;
the scaling module 126 is configured to: and zooming the original image to obtain an updated thumbnail.
With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.
Fig. 12 is a block diagram illustrating an apparatus 800 for recognizing a screensaver image according to an exemplary embodiment. For example, the apparatus 800 may be a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, an exercise device, a personal digital assistant, and the like.
Referring to fig. 12, the apparatus 800 may include one or more of the following components: a processing component 802, a memory 804, a power component 806, a multimedia component 808, an audio component 810, an input/output (I/O) interface 812, a sensor component 814, and a communication component 816.
The processing component 802 generally controls overall operation of the device 800, such as operations associated with display, telephone calls, data communications, camera operations, and recording operations. The processing component 802 may include one or more processors 820 to execute instructions to perform all or a portion of the steps of the above-described method of identifying a screenful image. Further, the processing component 802 can include one or more modules that facilitate interaction between the processing component 802 and other components. For example, the processing component 802 can include a multimedia module to facilitate interaction between the multimedia component 808 and the processing component 802.
The memory 804 is configured to store various types of data to support operations at the apparatus 800. Examples of such data include instructions for any application or method operating on device 800, contact data, phonebook data, messages, pictures, videos, and so forth. The memory 804 may be implemented by any type or combination of volatile or non-volatile memory devices such as Static Random Access Memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, magnetic or optical disks.
Power component 806 provides power to the various components of device 800. The power components 806 may include a power management system, one or more power sources, and other components associated with generating, managing, and distributing power for the device 800.
The multimedia component 808 includes a screen that provides an output interface between the device 800 and a user. In some embodiments, the screen may include a Liquid Crystal Display (LCD) and a Touch Panel (TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive an input signal from a user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundary of a touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 808 includes a front facing camera and/or a rear facing camera. The front camera and/or the rear camera may receive external multimedia data when the device 800 is in an operating mode, such as a shooting mode or a video mode. Each front camera and rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.
The audio component 810 is configured to output and/or input audio signals. For example, the audio component 810 includes a Microphone (MIC) configured to receive external audio signals when the apparatus 800 is in an operational mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals may further be stored in the memory 804 or transmitted via the communication component 816. In some embodiments, audio component 810 also includes a speaker for outputting audio signals.
The I/O interface 812 provides an interface between the processing component 802 and peripheral interface modules, which may be keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to: a home button, a volume button, a start button, and a lock button.
The sensor assembly 814 includes one or more sensors for providing various aspects of state assessment for the device 800. For example, the sensor assembly 814 may detect the open/closed status of the device 800, the relative positioning of components, such as a display and keypad of the device 800, the sensor assembly 814 may also detect a change in the position of the device 800 or a component of the device 800, the presence or absence of user contact with the device 800, the orientation or acceleration/deceleration of the device 800, and a change in the temperature of the device 800. Sensor assembly 814 may include a proximity sensor configured to detect the presence of a nearby object without any physical contact. The sensor assembly 814 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.
The communication component 816 is configured to facilitate communications between the apparatus 800 and other devices in a wired or wireless manner. The device 800 may access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 816 receives a broadcast signal or broadcast related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 816 further includes a Near Field Communication (NFC) module to facilitate short-range communications. For example, the NFC module may be implemented based on Radio Frequency Identification (RFID) technology, infrared data association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.
In an exemplary embodiment, the apparatus 800 may be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, micro-controllers, microprocessors or other electronic components for performing the above-described method of identifying an image of a screenful.
In an exemplary embodiment, a non-transitory computer-readable storage medium comprising instructions, such as the memory 804 comprising instructions, executable by the processor 820 of the device 800 to perform the above-described method of identifying a screenful image is also provided. For example, the non-transitory computer readable storage medium may be a ROM, a Random Access Memory (RAM), a CD-ROM, a magnetic tape, a floppy disk, an optical data storage device, and the like.
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims (9)

1. A method of identifying a screensaver image, comprising:
carrying out gray level processing on a single image to obtain a corresponding gray level image;
projecting the gray level image along the horizontal direction to obtain a horizontal projection curve of the gray level image;
detecting whether the horizontal projection curve has periodicity;
when the horizontal projection curve has periodicity, determining the single image as a screen-blooming image;
wherein, projecting the gray image along the horizontal direction to obtain a horizontal projection curve of the gray image comprises:
determining the sum of gray values of all pixel points on each line of the gray image;
averaging the sum of the gray values corresponding to each line of the gray image by using the number of lines of the gray image according to the following formula:
Figure FDF0000009943560000011
wherein X (n) represents the average gray value corresponding to the nth row in the gray image, SnRepresenting the sum of gray values of all pixel points on the nth row in the gray image, wherein N represents the number of rows in the gray image, and N is an integer which is more than or equal to 1 and less than or equal to N; or
Averaging the sum of the gray values corresponding to each line of the gray image according to the number of lines using the gray image by the following formula:
Figure FDF0000009943560000012
Figure FDF0000009943560000013
wherein X' (n) represents the average gray value corresponding to the nth row in the gray image, DnmRepresenting the gray value, S ', of the pixel point on the nth row and the mth column in the gray image'nRepresenting the sum of gray values of all pixel points on the nth row in the gray image, wherein M is a column of the gray image;
and generating the horizontal projection curve according to the average gray value corresponding to each line of the gray image.
2. The method of claim 1, wherein detecting whether the horizontal projection curve has periodicity comprises:
carrying out autocorrelation on the horizontal projection curve to obtain a corresponding autocorrelation curve;
detecting whether the autocorrelation curve has periodicity.
3. The method of claim 2, wherein detecting whether the autocorrelation curve is periodic comprises:
extracting a main peak value of the autocorrelation curve and a secondary peak value adjacent to the main peak value;
judging whether the ratio of the main peak value to the secondary peak value is in a preset range or not;
when the ratio is within the preset range, determining that the autocorrelation curve has periodicity.
4. The method of claim 1, wherein the single image is a thumbnail; after determining that the single image is a screenful image, the method further comprises:
acquiring an original image corresponding to the thumbnail;
and zooming the original image to obtain an updated thumbnail.
5. An apparatus for recognizing a screen-splash image, comprising:
the gray processing module is configured to perform gray processing on a single image to obtain a corresponding gray image;
a horizontal projection module configured to project the gray-scale image in a horizontal direction to obtain a horizontal projection curve of the gray-scale image;
a detection module configured to detect whether the horizontal projection curve has periodicity;
a determining module configured to determine that the single image is a screen-blooming image when the horizontal projection curve has periodicity;
wherein, horizontal projection module includes:
a determining submodule configured to determine a sum of gray values of all pixel points on each line of the gray image;
an averaging submodule configured to average a sum of gray values corresponding to each row of the gray image by using the number of rows of the gray image by the following formula:
Figure FDF0000009943560000031
wherein X (n) represents the average gray value corresponding to the nth row in the gray image, SnRepresenting the sum of gray values of all pixel points on the nth row in the gray image, wherein N represents the number of rows in the gray image, and N is an integer which is more than or equal to 1 and less than or equal to N; or
The average submodule is configured to average the sum of the gray values corresponding to each row of the gray image according to the number of rows using the gray image by the following formula:
Figure FDF0000009943560000032
Figure FDF0000009943560000033
wherein X' (n) represents the average gray value corresponding to the nth row in the gray image, DnmRepresenting the gray value, S ', of the pixel point on the nth row and the mth column in the gray image'nRepresenting the sum of gray values of all pixel points on the nth row in the gray image, wherein M is a column of the gray image;
and the generation submodule is configured to generate the horizontal projection curve according to the average gray value corresponding to each row of the gray image.
6. The apparatus of claim 5, wherein the detection module comprises:
an autocorrelation submodule configured to perform autocorrelation on the horizontal projection curve to obtain a corresponding autocorrelation curve;
a detection sub-module configured to detect whether the autocorrelation curve has periodicity.
7. The apparatus of claim 6, wherein the detection submodule comprises:
an extraction submodule configured to extract a main peak of the autocorrelation curve and a secondary peak adjacent to the main peak;
a judging submodule configured to judge whether a ratio of the primary peak to the secondary peak is within a preset range;
a determination submodule configured to determine that the autocorrelation curve has periodicity when the ratio is within the preset range.
8. The apparatus of claim 5, wherein the single image is a thumbnail; the device further comprises:
the obtaining module is configured to obtain an original image corresponding to the thumbnail after the single image is determined to be the screen-blooming image;
a scaling module configured to scale the original image to obtain an updated thumbnail.
9. An apparatus for recognizing a screen-splash image, comprising:
a processor;
a memory for storing processor-executable instructions;
wherein the processor is configured to:
carrying out gray level processing on a single image to obtain a corresponding gray level image;
projecting the gray level image along the horizontal direction to obtain a horizontal projection curve of the gray level image;
detecting whether the horizontal projection curve has periodicity;
when the horizontal projection curve has periodicity, determining the single image as a screen-blooming image;
wherein, projecting the gray image along the horizontal direction to obtain a horizontal projection curve of the gray image comprises:
determining the sum of gray values of all pixel points on each line of the gray image;
averaging the sum of the gray values corresponding to each line of the gray image by using the number of lines of the gray image according to the following formula:
Figure FDF0000009943560000051
wherein X (n) represents the average gray value corresponding to the nth row in the gray image, SnRepresenting the sum of gray values of all pixel points on the nth row in the gray image, wherein N represents the number of rows in the gray image, and N is an integer which is more than or equal to 1 and less than or equal to N; or
Averaging the sum of the gray values corresponding to each line of the gray image according to the number of lines using the gray image by the following formula:
Figure FDF0000009943560000052
Figure FDF0000009943560000053
wherein X' (n) represents the average gray value corresponding to the nth row in the gray image, DnmRepresenting the gray value, S ', of the pixel point on the nth row and the mth column in the gray image'nRepresenting the sum of gray values of all pixel points on the nth row in the gray image, wherein M is a column of the gray image;
and generating the horizontal projection curve according to the average gray value corresponding to each line of the gray image.
CN201710233998.3A 2017-04-11 2017-04-11 Method and device for identifying screen-patterned image Active CN107067392B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710233998.3A CN107067392B (en) 2017-04-11 2017-04-11 Method and device for identifying screen-patterned image

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710233998.3A CN107067392B (en) 2017-04-11 2017-04-11 Method and device for identifying screen-patterned image

Publications (2)

Publication Number Publication Date
CN107067392A CN107067392A (en) 2017-08-18
CN107067392B true CN107067392B (en) 2020-11-10

Family

ID=59602718

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710233998.3A Active CN107067392B (en) 2017-04-11 2017-04-11 Method and device for identifying screen-patterned image

Country Status (1)

Country Link
CN (1) CN107067392B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107909569B (en) * 2017-11-10 2020-12-25 Oppo广东移动通信有限公司 Screen-patterned detection method, screen-patterned detection device and electronic equipment

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289779A (en) * 2011-07-29 2011-12-21 中国科学院长春光学精密机械与物理研究所 Device for obtaining width of Moire fringe by using image processing technology
CN104978748A (en) * 2015-07-06 2015-10-14 电子科技大学 Liquid crystal screen defect detection method based on local pixel values
CN105339980A (en) * 2013-05-31 2016-02-17 微软技术许可有限责任公司 Absolute phase measurement with secondary pattern-embedded fringe
CN105554494A (en) * 2015-12-09 2016-05-04 浙江省公众信息产业有限公司 Snow point image detection method and device and video quality detection device and system
EP3054673A1 (en) * 2013-09-30 2016-08-10 Panasonic Corporation Display method and display device
CN106303158A (en) * 2016-09-30 2017-01-04 杭州电子科技大学 A kind of striped method for detecting abnormality in video image

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102289779A (en) * 2011-07-29 2011-12-21 中国科学院长春光学精密机械与物理研究所 Device for obtaining width of Moire fringe by using image processing technology
CN105339980A (en) * 2013-05-31 2016-02-17 微软技术许可有限责任公司 Absolute phase measurement with secondary pattern-embedded fringe
EP3054673A1 (en) * 2013-09-30 2016-08-10 Panasonic Corporation Display method and display device
CN104978748A (en) * 2015-07-06 2015-10-14 电子科技大学 Liquid crystal screen defect detection method based on local pixel values
CN105554494A (en) * 2015-12-09 2016-05-04 浙江省公众信息产业有限公司 Snow point image detection method and device and video quality detection device and system
CN106303158A (en) * 2016-09-30 2017-01-04 杭州电子科技大学 A kind of striped method for detecting abnormality in video image

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
基于纹理周期性分析的织物疵点检测方法;祝双武 等;《计算机工程与应用》;20120731;第48卷(第21期);第163-166页 *

Also Published As

Publication number Publication date
CN107067392A (en) 2017-08-18

Similar Documents

Publication Publication Date Title
US10141025B2 (en) Method, device and computer-readable medium for adjusting video playing progress
CN106557768B (en) Method and device for recognizing characters in picture
US11061202B2 (en) Methods and devices for adjusting lens position
US10452890B2 (en) Fingerprint template input method, device and medium
EP3125135A1 (en) Picture processing method and device
US9959484B2 (en) Method and apparatus for generating image filter
US20160065785A1 (en) Methods and apparatuses for generating photograph
EP3173970A1 (en) Image processing method and apparatus
CN107944367B (en) Face key point detection method and device
CN106557759B (en) Signpost information acquisition method and device
CN107563994B (en) Image significance detection method and device
CN109034150B (en) Image processing method and device
US10402619B2 (en) Method and apparatus for detecting pressure
CN106534951B (en) Video segmentation method and device
US10083346B2 (en) Method and apparatus for providing contact card
CN108717542B (en) Method and device for recognizing character area and computer readable storage medium
CN107133577B (en) Fingerprint identification method and device
US20220222831A1 (en) Method for processing images and electronic device therefor
CN106331328B (en) Information prompting method and device
CN113920465A (en) Method and device for identifying film trailer, electronic equipment and storage medium
CN110286813B (en) Icon position determining method and device
CN105488074B (en) Photo clustering method and device
CN107657608B (en) Image quality determination method and device and electronic equipment
CN107292901B (en) Edge detection method and device
CN107067392B (en) Method and device for identifying screen-patterned image

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
GR01 Patent grant
GR01 Patent grant