CN-116630207-B - Image processing method, device and computer readable storage medium
Abstract
The application discloses an image processing method, a device and a computer readable storage medium, wherein the image processing method comprises the steps of (a) obtaining a first size parameter of an original image and a second size parameter of a target image; the method comprises the steps of (a) obtaining input pixel points of an original image according to a preset parallel quantity, (c) screening pixel lattice center points from the input pixel points by utilizing a first size parameter, a second size parameter, the parallel quantity and a preset algorithm, and (d) carrying out image processing of a pixel lattice on the original image according to the pixel lattice center points to obtain output pixel points, wherein the output pixel points form the target image. The application can directly process the image of the pixel dot matrix after acquiring the center point of the pixel dot matrix in each processing period to acquire the output pixel dot, namely, the original image can be cached and processed in the image processing process of the original image, and the whole original image is not required to be pre-stored in advance, so that the consumption of storage resources is reduced.
Inventors
- GUO CAI
- ZHAO DONGSHENG
Assignees
- 丰疆自动化科技(西安)有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20221210
Claims (10)
- 1. An image processing method, the method comprising: (a) Acquiring a first size parameter of an original image and a second size parameter of a target image; (b) Acquiring input pixel points of the original image according to a preset parallel quantity; (c) Screening a pixel lattice center point from the input pixel points by using the first size parameter, the second size parameter, the preset parallel quantity and a preset algorithm; (d) And carrying out image processing of a pixel lattice on the original image according to the pixel lattice center point to obtain an output pixel point, wherein the output pixel point forms the target image.
- 2. The image processing method of claim 1, wherein the step (c) includes: judging whether the input pixel points are in a calculation row or not; when the input pixel point is determined to be in a calculation line, a center point calculation result of the input pixel point is obtained by using the first size parameter, the second size parameter, the preset parallel quantity and the preset algorithm; and screening out input pixel points with center point calculation results in a preset threshold range to serve as the center points of the pixel dot matrix.
- 3. The image processing method according to claim 2, wherein input pixels of the original image are periodically acquired according to the preset parallel number; The obtaining a center point calculation result of the input pixel point by using the first size parameter, the second size parameter, the preset parallel number and the preset algorithm includes: When the input pixel point acquired for the initial period is determined, the center point calculation result is obtained by using the first size parameter, the second size parameter, the preset parallel quantity and the preset algorithm; When the input pixel points acquired in the non-initial period are determined, updating the center point calculation result in a preset storage space by using a preset value to acquire the center point calculation result in the current period; the preset storage space comprises registers with the preset parallel quantity, and each register stores one center point calculation result.
- 4. The image processing method according to claim 3, wherein the first size parameter includes a first pixel pitch of the original image, the second size parameter includes a second pixel pitch of the target image, and the formula of the preset algorithm includes: ; Wherein, the Is the first The center point calculation results of the input pixel points, For the first pixel pitch to be the first, For the second pixel pitch to be the second pixel pitch, To obtain the initial phase of the center point of the pixel array, For the preset number of parallelism, the number of parallelism, To take the remainder operator.
- 5. The image processing method according to claim 3, wherein the expression for updating the center point calculation result in the preset storage space with a preset value includes: ; Wherein, the For the value of the said preset value, For a first pixel pitch of the original image, For a second pixel pitch of the original image, For the preset number of parallelism, the number of parallelism, In order to take the remainder operator, Is the first of the current period The result of the calculation of each of said center points, Is the first in the preset storage space And calculating results of the central points.
- 6. The image processing method according to claim 2, wherein the first size parameter includes a first pixel pitch of the original image, and the second size parameter includes a second pixel pitch of the target image; The determining whether the input pixel point is in a computing row includes: When meeting the requirements And determining that the input pixel point is in the computing row, wherein, For the input pixel points in the pixel rows of the original image, For the first pixel pitch to be the first, For the second pixel pitch to be the second pixel pitch, To obtain the initial phase of the center point of the pixel array, To take the remainder operator.
- 7. The image processing method according to claim 1, wherein the performing image processing of the pixel lattice on the original image according to the pixel lattice center point to obtain an output pixel point includes: Acquiring a pixel lattice from the original image according to the tap number of a preset filter and the pixel lattice center point; and inputting the pixel dot matrix into the preset filter to obtain the output pixel dot output by the preset filter.
- 8. The image processing method according to any one of claims 1 to 7, wherein after the step (d), the method further comprises: repeating steps (b) - (d) to obtain a plurality of said output pixels and combining a plurality of said output pixels until said target image is obtained.
- 9. An image processing apparatus, characterized in that the apparatus comprises: The size parameter acquisition module is used for acquiring a first size parameter of the original image and a second size parameter of the target image; The input pixel point acquisition module is used for acquiring input pixel points of the original image according to a preset parallel quantity; The dot matrix central point acquisition module is used for screening out pixel dot matrix central points from the input pixel points by utilizing the first size parameter, the second size parameter, the preset parallel quantity and a preset algorithm; And the output pixel point acquisition module is used for carrying out lattice filtering processing on the original image according to the pixel lattice center point to obtain an output pixel point, and the output pixel point forms the target image.
- 10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores a computer program which, when executed by a processor, causes the processor to execute the image processing method according to any one of claims 1 to 8.
Description
Image processing method, device and computer readable storage medium Technical Field The present application relates to the field of image processing technologies, and in particular, to an image processing method, an image processing device, and a computer readable storage medium. Background In the related art, in the process of outputting a target image after performing image processing on an original image, it is generally required to buffer the entire original image before performing image processing, and then perform image processing on a stored original image, so as to finally generate a processed target image. The image processing procedure of the related art consumes a large amount of memory resources due to the need to buffer the entire original image. Disclosure of Invention In view of the above, the present application provides an image processing method, apparatus, and computer-readable storage medium, by which the problem of large consumption of storage resources can be solved. The technical scheme of the application is as follows: The application provides an image processing method, which comprises the steps of (a) obtaining a first size parameter of an original image and a second size parameter of a target image, (b) obtaining input pixel points of the original image according to a preset parallel quantity, (c) screening out a pixel lattice center point from the input pixel points by using the first size parameter, the second size parameter, the preset parallel quantity and a preset algorithm, and (d) carrying out image processing of a pixel lattice on the original image according to the pixel lattice center point to obtain output pixel points, wherein the output pixel points form the target image. In one embodiment, the step (c) includes determining whether the input pixel is in a calculation line, obtaining a center point calculation result of the input pixel by using the first size parameter, the second size parameter, the preset parallel number and the preset algorithm when the input pixel is determined to be in the calculation line, and screening out the input pixel with the center point calculation result in a preset threshold range as the pixel lattice center point. In one embodiment, the method comprises the steps of periodically obtaining input pixel points of the original image according to the preset parallel quantity, obtaining a center point calculation result of the input pixel points by using the first size parameter, the second size parameter, the preset parallel quantity and the preset algorithm, obtaining the center point calculation result by using the first size parameter, the second size parameter, the parallel quantity and the preset algorithm when the input pixel points obtained in an initial period are determined, and updating the center point calculation result in a preset storage space by using a preset value when the input pixel points obtained in a non-initial period are determined, so as to obtain the center point calculation result in a current period, wherein the preset storage space comprises registers of the preset parallel quantity, and each register stores one center point calculation result. In one embodiment, the first size parameter includes a first pixel pitch of the original image, the second size parameter includes a second pixel pitch of the target image, and the formula of the preset algorithm includes: ; Wherein, the Is the firstThe center point calculation results of the input pixel points,For the first pixel pitch to be the first,For the second pixel pitch to be the second pixel pitch,To obtain the initial phase of the center point of the pixel array,For the preset number of parallelism, the number of parallelism,To take the remainder operator. In one embodiment, the formula for updating the center point calculation result in the preset storage space by using a preset numerical value includes: ; Wherein, the For the value of the said preset value,For the first pixel pitch to be the first,For the second pixel pitch to be the second pixel pitch,For the preset number of parallelism, the number of parallelism,In order to take the remainder operator,Is the first of the current periodThe result of the calculation of each of said center points,Is the first in the preset storage spaceAnd calculating results of the central points. In one embodiment, the first size parameter includes a first pixel pitch of the original image, the second size parameter includes a second pixel pitch of the target image, and the determining whether the input pixel is in the calculation line includes whenAnd determining that the input pixel point is in the computing row, wherein,For the input pixel points in the pixel rows of the original image,For the first pixel pitch to be the first,For the second pixel pitch to be the second pixel pitch,To obtain the initial phase of the center point of the pixel array,To take the remainder operator. In one embodiment, the processing the o