# US 2021/0174553 A1 · Image processing method and apparatus, and storage medium

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2021/0174553 A1
- Document ID: US20210174553A1
- Status: Published application
- Kind: A1
- Application number: 15/930,256
- Filed: 2020-05-12
- Published: 2021-06-10
- Earliest claimed: 2019-12-10
- Assignees: Beijing Xiaomi Mobile Software Co., Ltd.
- Applicants: Beijing Xiaomi Mobile Software Co., Ltd.
- Inventors: Qian WANG; Yu ZHAO
- Web page: https://patentgrep.com/patent/US20210174553A1

## CPC

- G06T 5/73: Deblurring; Sharpening
- G06T 5/50: using two or more images, e.g. averaging or subtraction
- G06T 7/12: Edge-based segmentation
- G06T 9/20: Contour coding, e.g. using detection of edges
- G06V 10/20: Image preprocessing
- G06V 30/133: {Evaluation of quality of the acquired characters}
- G06T 2207/20092: Interactive image processing based on input by user
- G06T 2207/20192: Edge enhancement; Edge preservation
- G06V 30/10: Character recognition
- G06T: IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06V: IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING

## Abstract

Provided are an image processing method, apparatus and a storage medium. The method includes: collecting at least one image within a field of view of an image collection device in real time through the image collection device of a terminal device; determining whether a first image includes at least one character based on the collected first image; under a situation that the collected first image includes the character, outputting prompt information to a user; receiving a setting instruction input by the user; and improving sharpness of the character according to the setting instruction to obtain a second image, and compressing and storing the second image.

## Claims

### Claim 1

An image processing method, comprising:
collecting, by an image collection device of a terminal device, at least one image within a field of view of the image collection device in real time, wherein the at least one image comprises a first image;
determining, by the terminal device, whether the first image comprises at least one character;
in response to determining that the first image comprises the at least one character, outputting, by the terminal device, prompt information to a user;
receiving, by the terminal device, a setting instruction input by the user; and
improving, by the terminal device, sharpness of the at least one character according to the setting instruction to obtain a second image, and compressing and storing the second image on the terminal device.

### Claim 2 (depends on 1)

The method of claim 1, further comprising:
segmenting, by the terminal device, the first image to acquire the at least one character and a peripheral image region of the at least one character in the first image,
wherein determining, by the terminal device, whether the first image comprises the at least one character comprises: determining, by the terminal device, whether the first image comprises a region having the at least one character larger than a preset area threshold; and
improving, by the terminal device, the sharpness of the at least one character comprises at least one of followings:
sharpening, by the terminal device, an edge of the at least one character; and
increasing, by the terminal device, a contrast between the at least one character and the peripheral image region of the at least one character.

### Claim 3 (depends on 2)

The method of claim 2, wherein segmenting, by the terminal device, the first image to acquire the at least one character and the peripheral image region of the at least one character in the first image comprises:
segmenting, by the terminal device, the first image to acquire different image regions; and
performing, by the terminal device, optical character recognition on a plurality of sub-images within the different image regions to acquire the region having the at least one character and the peripheral image region of the at least one character in the first image.

### Claim 4 (depends on 3)

The method of claim 3, wherein performing, by the terminal device, the optical character recognition on the plurality of sub-images within the different image regions to acquire the region having the at least one character and the peripheral image region of the at least one character in the first image comprises:
recognizing, by the terminal device, the plurality of the sub-images within the different image regions based on the optical character recognition to obtain a plurality of character recognition results of the sub-images within the different image regions and a plurality of confidences of the character recognition results;
when a confidence of a sub-image within an image region is greater than a first threshold, determining that the image region is the region having the at least one character in the first image; and
when the confidence of the sub image within the image region is less than or equal to the first threshold, determining that the image region is the peripheral image region of the at least one character.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
when the confidence of the sub-image within the image region having the at least one character is greater than a second threshold, compressing the first image, wherein the second threshold is greater than the first threshold.

### Claim 6 (depends on 5)

The method of claim 5, wherein improving, by the terminal device, the sharpness of the at least one character to obtain the second image comprises:
improving, by the terminal device, the sharpness of the at least one character to obtain the second image when the confidence of the sub-image within the image region having the at least one character is less than or equal to the second threshold.

### Claim 7 (depends on 1)

The method of claim 1, further comprising:
determining, by the terminal device, whether an image compression function is enabled according to image compression information in the setting instruction,
wherein improving, by the terminal device, the sharpness of the at least one character to obtain the second image, and compressing and storing, by the terminal device, the second image comprises: improving, by the terminal device, the sharpness of the at least one character to obtain the second image, and compressing and storing, by the terminal device, the second image when the image compression function is enabled and the first image comprises the at least one character.

### Claim 8 (depends on 1)

The method of claim 1, wherein compressing and storing, by the terminal device, the second image comprises at least one of followings:
converting the second image from a color image into a black-and-white image for storage; and
converting the second image from a color image into a gray image for storage.

### Claim 9

An image processing apparatus, comprising:
a processor; and
a memory configured to store instructions executable by the processor,
wherein the processor is configured to perform acts comprising:
collecting, by an image collection device of the image processing apparatus, at least one image within a field of view of the image collection device in real time, wherein the at least one image comprises a first image;
determining whether the first image comprises at least one character;
in response to determining that the first image comprises the at least one character, outputting prompt information to a user;
receiving a setting instruction input by the user; and
improving sharpness of the at least one character according to the setting instruction to obtain a second image, and compress and store the second image.

### Claim 10 (depends on 9)

The apparatus of claim 9, wherein the processor is further configured to perform acts comprising:
segmenting the first image to acquire the at least one character and a peripheral image region of the at least one character in the first image,
wherein determining whether the first image comprises the at least one character comprises: determining whether the first image comprises a region having the at least one character larger than a preset area threshold; and
improving the sharpness of the at least one character comprises at least one of followings: sharpening an edge of the at least one character, and increasing a contrast between the at least one character and the peripheral image region of the at least one character.

### Claim 11 (depends on 10)

The apparatus of claim 10, wherein segmenting the first image to acquire the at least one character and the peripheral image region of the at least one character in the first image comprises:
segmenting the first image to acquire different image regions, and
performing optical character recognition on a plurality of sub-images within the different image regions to acquire the region having the at least one character and the peripheral image region of the at least one character in the first image.

### Claim 12 (depends on 11)

The apparatus of claim 11, wherein performing the optical character recognition on the plurality of sub-images within the different image regions to acquire the region having the at least one character and the peripheral image region of the at least one character in the first image comprises:
recognizing the plurality of sub-images within the different image regions based on the optical character recognition to obtain a plurality of character recognition results of the sub-images within the different image regions and a plurality of confidences of the character recognition results;
when a confidence of a sub-image within an image region is greater than a first threshold, determining that the image region is the region having the at least one character in the first image;
when the confidence of the sub-image within the image region is less than or equal to the first threshold, determining that the image region is the peripheral image region of the at least one character.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein the processor is further configured to perform acts comprising:
when the confidence of the sub-image within the image region having the at least one character is greater than a second threshold, compressing the first image, wherein the second threshold is greater than the first threshold.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein improving the sharpness of the at least one character to obtain the second image comprises:
improving the sharpness of the at least one character to obtain the second image when the confidence of the sub-image within the image region having the at least one character is less than or equal to the second threshold.

### Claim 15 (depends on 9)

The apparatus of claim 9, wherein the processor is further configured to perform acts comprising:
determining whether an image compression function is enabled according to image compression information in the setting instruction, and
wherein improving the sharpness of the at least one character to obtain the second image, and compressing and storing the second image comprises: improving the sharpness of the at least one character to obtain the second image, and compressing and storing the second image when the image compression function is enabled and the first image comprises the at least one character.

### Claim 16 (depends on 9)

The apparatus of claim 9, wherein compressing and storing the second image comprises at least one of followings:
converting the second image from a color image into a black-and-white image for storage; and
converting the second image from a color image into a gray image for storage.

### Claim 17

A non-transitory computer-readable storage medium storing a plurality of programs for execution by an image processing apparatus having one or more processors, wherein the plurality of programs, when executed by the one or more processors, cause the image processing apparatus to perform acts comprising:
collecting, by an image collection device of the image processing apparatus, at least one image within a field of view of the image collection device in real time, wherein the at least one image comprises a first image;
determining whether the first image comprises at least one character;
in response to determining that the first image comprises the at least one character, outputting prompt information to a user;
receiving a setting instruction input by the user; and
improving sharpness of the at least one character according to the setting instruction to obtain a second image, and compressing and storing the second image.

### Claim 18 (depends on 17)

The non-transitory computer-readable storage medium of claim 17, wherein the plurality of programs cause the image processing apparatus to perform acts further comprising:
segmenting the first image to acquire the at least one character and a peripheral image region of the at least one character in the first image,
wherein determining whether the first image comprises the at least one character comprises: determining whether the first image comprises a region having the at least one character larger than a preset area threshold; and
improving the sharpness of the at least one character comprises at least one of followings: sharpening an edge of the at least one character, and increasing a contrast between the at least one character and the peripheral image region of the at least one character.

### Claim 19 (depends on 18)

The non-transitory computer-readable storage medium of claim 18, wherein segmenting the first image to acquire the at least one character and the peripheral image region of the at least one character in the first image comprises:
segmenting the first image to acquire different image regions; and
performing optical character recognition on a plurality of sub-images within the different image regions to acquire the region having the at least one character and the peripheral image region of the at least one character in the first image.

### Claim 20 (depends on 19)

The non-transitory computer-readable storage medium of claim 19, wherein performing the optical character recognition on the plurality of sub-images within the different image regions to acquire the region having the at least one character and the peripheral image region of the at least one character in the first image comprises:
recognizing the plurality of sub-images within the different image regions based on the optical character recognition to obtain a plurality of character recognition results of the sub-images within the different image regions and a plurality of confidences of the character recognition results;
when a confidence of a sub-image within an image region is greater than a first threshold, determining that the image region is the region having the at least one character in the first image; and
when the confidence of the sub-image within the image region is less than or equal to the first threshold, determining that the image region is the peripheral image region of the at least one character.
