US11430103B2ActiveUtilityA1

Method for image processing, non-transitory computer readable storage medium, and electronic device

Assignee: GUANGDONG OPPO MOBILE TELECOMMUNICATIONS CORP LTDPriority: Jun 8, 2018Filed: Sep 19, 2020Granted: Aug 30, 2022
Est. expiryJun 8, 2038(~11.9 yrs left)· nominal 20-yr term from priority
Inventors:Yan Chen
G06V 10/273G06V 10/443G06V 10/30G06F 18/241G06F 18/23G06T 7/0002G06T 2207/10004G06T 2207/30168G06T 2207/10024G06T 7/13G06K 9/6218G06K 9/6268
88
PatentIndex Score
2
Cited by
28
References
15
Claims

Abstract

A method for image processing includes the following. Edge pixel points in the image to be processed are determined by performing edge detection on the image to be processed. The number of the edge pixel points in the image to be processed is determined as a first pixel number. Determine that a moire pattern exists in the image to be processed when the first pixel number is larger than a first number threshold.

Claims

exact text as granted — not AI-modified
What is claimed is: 
     
       1. A method for image processing, comprising:
 obtaining an image to be processed; 
 determining edge pixel points in the image to be processed by performing edge detection on the image to be processed; 
 determining the number of the edge pixel points in the image to be processed as a first pixel number; 
 determining the number of edge pixel points of a specified color as a second pixel number when the first pixel number is larger than a first number threshold; and 
 determining that a moire pattern exists in the image to be processed when the second pixel number is larger than a second number threshold, wherein the second number threshold is smaller than or equal to the first number threshold. 
 
     
     
       2. The method of  claim 1 , wherein determining the number of the edge pixel points in the image to be processed as the first pixel number comprises:
 performing binary processing on the image to be processed to obtain a binary image, wherein the binary image comprises pixel points of a first color and pixel points of a second color; 
 determining the pixel points of the first color as the edge pixel points in the image to be processed; and 
 determining the number of the pixel points of the first color in the binary image as the first pixel number. 
 
     
     
       3. The method of  claim 1 , wherein determining the number of the edge pixel points of the specified color as the second pixel number comprises:
 performing cluster processing on the edge pixel points of the specified color to obtain a plurality of categories of edge pixel points, wherein each category of edge pixel points forms a continuous edge line; 
 determining an edge line with a length exceeding a length threshold as a target edge line; and 
 determining the total number of edge pixel points in the target edge line as the second pixel number. 
 
     
     
       4. The method of  claim 1 , further comprising:
 determining a minimum rectangular region containing all the edge pixel points in the image to be processed; 
 determining the number of pixel points in the minimum rectangular region as a region pixel number; and 
 obtaining the first number threshold according to the region pixel number. 
 
     
     
       5. The method of  claim 4 , wherein determining the minimum rectangular region containing all the edge pixel points in the image to be processed comprises:
 establishing a coordinate system according to the image to be processed and obtaining a coordinate of each of the edge pixel points in the coordinate system; and 
 determining vertex coordinates according to the obtained coordinate of each of the edge pixel points and determining the minimum rectangular region according to the vertex coordinates. 
 
     
     
       6. The method of  claim 1 , further comprising:
 determining that no moire pattern exists in the image to be processed when the first pixel number is smaller than or equal to the first number threshold; and 
 recognizing the image to be processed to obtain an image classification tag for the image to be processed, wherein the image classification tag is indicative of a classification of the image to be processed. 
 
     
     
       7. The method of  claim 1 , further comprising:
 eliminating the moire pattern in the image to be processed based on a determination that the moire pattern exists in the image to be processed; and 
 recognizing the image to be processed to obtain an image classification tag for the image to be processed after the moire pattern is eliminated, wherein the image classification tag is indicative of a classification of the image to be processed. 
 
     
     
       8. A non-transitory computer readable storage medium configured to store computer programs, the computer programs which, when executed by a processor, are operable with the processor to:
 obtain an image to be processed; 
 determine edge pixel points in the image to be processed by performing edge detection on the image to be processed; 
 determine the number of the edge pixel points in the image to be processed as a first pixel number; 
 determine that a moire pattern exists in the image to be processed when the first pixel number is larger than a first number threshold, 
 establish a coordinate system according to the image to be processed and obtain a coordinate of each of the edge pixel points in the coordinate system; 
 determine vertex coordinates according to the obtained coordinate of each of the edge pixel points and determine a minimum rectangular region according to the vertex coordinates; 
 determine the number of pixel points in the minimum rectangular region as a region pixel number; and 
 obtain the first number threshold according to the region pixel number. 
 
     
     
       9. The non-transitory computer readable storage medium of  claim 8 , wherein the computer programs operable with the processor to determine the number of the edge pixel points in the image to be processed as the first pixel number are operable with the processor to:
 perform binary processing on the image to be processed to obtain a binary image, wherein the binary image comprises pixel points of a first color and pixel points of a second color; 
 determine the pixel points of the first color as the edge pixel points in the image to be processed; and 
 determine the number of the pixel points of the first color in the binary image as the first pixel number. 
 
     
     
       10. The non-transitory computer readable storage medium of  claim 8 , wherein the computer programs operable with the processor to determine that the moire pattern exists in the image to be processed when the first pixel number is larger than the first number threshold are operable with the processor to:
 determine the number of edge pixel points of a specified color as a second pixel number when the first pixel number is larger than the first number threshold; and 
 determine that the moire pattern exists in the image to be processed when the second pixel number is larger than a second number threshold, wherein the second number threshold is smaller than or equal to the first number threshold. 
 
     
     
       11. The non-transitory computer readable storage medium of  claim 10 , wherein the computer programs operable with the processor to determine the number of the edge pixel points of the specified color as the second pixel number are operable with the processor to:
 perform cluster processing on the edge pixel points of the specified color to obtain a plurality of categories of edge pixel points, wherein each category of edge pixel points forms a continuous edge line; 
 determine an edge line with a length exceeding a length threshold as a target edge line; and 
 determine the total number of edge pixel points in the target edge line as the second pixel number. 
 
     
     
       12. The non-transitory computer readable storage medium of  claim 8 , wherein the computer programs are further operable with the processor to:
 determine that no moire pattern exists in the image to be processed when the first pixel number is smaller than or equal to the first number threshold; and 
 recognize the image to be processed to obtain an image classification tag for the image to be processed, wherein the image classification tag is indicative of a classification of the image to be processed. 
 
     
     
       13. An electronic device, comprising:
 a processor; and 
 a memory configured to store computer readable instructions which, when executed by the processor, are operable with the processor to:
 obtain an image to be processed; 
 determine edge pixel points in the image to be processed by performing edge detection on the image to be processed; 
 determine the number of the edge pixel points in the image to be processed as a first pixel number; 
 perform cluster processing on the edge pixel points of a specified color to obtain a plurality of categories of edge pixel points, wherein each category of edge pixel points forms a continuous edge line; 
 determine an edge line with a length exceeding a length threshold as a target edge line; 
 determine the total number of edge pixel points in the target edge line as a second pixel number; and 
 determine that a moire pattern exists in the image to be processed when the second pixel number is larger than a second number threshold, wherein the second number threshold is smaller than or equal to a first number threshold. 
 
 
     
     
       14. The electronic device of  claim 13 , wherein the computer readable instructions operable with the processor to determine the number of the edge pixel points in the image to be processed as the first pixel number are operable with the processor to:
 perform binary processing on the image to be processed to obtain a binary image, wherein the binary image comprises pixel points of a first color and pixel points of a second color; 
 determine the pixel points of the first color as the edge pixel points in the image to be processed; and 
 determine the number of the pixel points of the first color in the binary image as the first pixel number. 
 
     
     
       15. The electronic device of  claim 13 , wherein the computer readable instructions are further operable with the processor to:
 determine a minimum rectangular region containing all the edge pixel points in the image to be processed; 
 determine the number of pixel points in the minimum rectangular region as a region pixel number; and 
 obtain the first number threshold according to the region pixel number.

Join the waitlist — get patent alerts

Track US11430103B2 — get alerts on status changes and closely related new filings.

We store only your email — no account needed. See our privacy policy.