CN111340706B - Image reduction method and image reduction system - Google Patents
Image reduction method and image reduction system Download PDFInfo
- Publication number
- CN111340706B CN111340706B CN202010118597.5A CN202010118597A CN111340706B CN 111340706 B CN111340706 B CN 111340706B CN 202010118597 A CN202010118597 A CN 202010118597A CN 111340706 B CN111340706 B CN 111340706B
- Authority
- CN
- China
- Prior art keywords
- image
- pixel points
- reduced
- intermediate value
- transformation operation
- 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
Links
- 230000009467 reduction Effects 0.000 title claims abstract description 43
- 238000000034 method Methods 0.000 title claims abstract description 36
- 238000004364 calculation method Methods 0.000 claims abstract description 39
- 230000009466 transformation Effects 0.000 claims description 30
- 238000006243 chemical reaction Methods 0.000 claims description 18
- 230000008569 process Effects 0.000 claims description 12
- 238000013215 result calculation Methods 0.000 claims description 3
- 238000004422 calculation algorithm Methods 0.000 description 4
- 230000009286 beneficial effect Effects 0.000 description 2
- 238000010586 diagram Methods 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The invention provides an image reducing method, which comprises the step of reducing continuous pixel points of pixel points in a first direction of a source image into 1 point according to the number of first reduced pixel points and the number of second reduced pixel points so as to obtain an intermediate image of the source image reduced in the first direction. In the image reduction method, the number of the first reduced pixel points and the number of the second reduced pixel points are calculated only once, and repeated calculation is not needed, so that the use of a divider and a multiplier is greatly reduced, and the occupation of resources is reduced. The invention also provides an image reducing system for realizing the image reducing method.
Description
Technical Field
The present invention relates to the field of image reduction technologies, and in particular, to an image reduction method and an image reduction system.
Background
The traditional bilinear interpolation algorithm is a classic scaling algorithm in image processing, in bilinear interpolation, 2 multiplied by 2 adjacent pixel points near the original image and other positions are calculated through a weighted average value to obtain the pixel points of a reduced image, so that the algorithm needs to frequently use related resources such as a multiplier and a divider in the operation process, and therefore resources occupied by the algorithm are increased.
Therefore, it is necessary to provide a novel image reduction method and image reduction system to solve the above problems in the prior art.
Disclosure of Invention
The invention aims to provide an image reducing method and an image reducing system, which can reduce the resources occupied by image reduction.
To achieve the above object, the image reducing method of the present invention includes the steps of:
s1: performing complementation processing on the pixel points of the source image and the target image in the first direction to obtain a first transformation operation frequency;
s2: subtracting the number of pixel points in the first direction of the target image and the first transformation operation frequency to obtain a second transformation operation frequency;
s3: performing first division processing on the pixel points of the source image and the target image in the first direction to obtain second reduced pixel points;
s4: multiplying the number of the reduced pixel points of the second transformation operation and the number of times of the second transformation operation to obtain a first intermediate value;
s5: subtracting the number of pixel points in the first direction of the source image and the first intermediate value to obtain a second intermediate value;
s6: performing second division processing on the second intermediate value and the first transformation operation times to obtain a first reduced pixel point number;
s7: and reducing continuous pixel points to 1 point by pixel points in the first direction of the source image according to the number of the first reduced pixel points and the number of the second reduced pixel points so as to obtain an intermediate image of the source image reduced in the first direction.
The invention has the beneficial effects that: and reducing continuous pixel points to 1 point by pixel points in the first direction of the source image according to the first reduced pixel point number and the second reduced pixel point number, and calculating the first reduced pixel point number and the second reduced pixel point number only once without repeated calculation, thereby greatly reducing the use of a divider and a multiplier and reducing the occupation of resources.
Preferably, the image reduction method further includes performing the same processing as the first direction on the intermediate image in a second direction to obtain the target image.
Preferably, the first division process rounds down.
Preferably, the image reduction method further includes performing a second division process on the second number of transform operations and the first number of transform operations to obtain an interval value.
Further preferably, the second dividing process rounds down or rounds up to obtain the interval numerical times.
Further preferably, the second conversion operation of the interval numerical times is a one-time continuous conversion operation, and in step S7, the continuous conversion operation and the first conversion operation are alternately executed. The beneficial effects are that: the output image is smooth and uniform, and the tearing of the reduced image is avoided.
The invention also provides an image reduction system, which comprises a first conversion operation frequency calculation module, a second conversion operation frequency calculation module, a first reduced pixel point number calculation module, a second reduced pixel point number calculation module and a pixel point reduction module, wherein the first reduced pixel point number calculation module comprises a first intermediate value calculation unit, a second intermediate value calculation unit and a result calculation unit, and the first conversion operation frequency calculation module is used for performing complementation processing on the pixel points of the source image and the target image in the first direction to obtain a first conversion operation frequency; the second transformation operation frequency calculation module is used for subtracting the number of pixel points in the first direction of the target image and the first transformation operation frequency to obtain a second transformation operation frequency; the second reduced pixel point number calculating module is used for performing first division processing on the pixel points of the source image and the target image in the first direction to obtain second reduced pixel point numbers; the first intermediate value calculation unit is configured to multiply the number of reduced pixel points of the second transform operation and the number of times of the second transform operation to obtain a first intermediate value; the second intermediate value calculating unit is used for subtracting the number of the pixel points in the first direction of the source image and the first intermediate value to obtain a second intermediate value; the result calculating unit is used for performing second division processing on the second intermediate value and the first transformation operation times to obtain a first reduced pixel point number; the pixel point reduction module is used for reducing the pixel points of the source image in the first direction into 1 point according to the number of the first reduced pixel points and the number of the second reduced pixel points so as to obtain an intermediate image of the source image reduced in the first direction.
The image reducing system has the advantages that: the pixel point reduction module is used for reducing continuous pixel points of the pixel points in the first direction of the source image into 1 point according to the number of the first reduced pixel points and the number of the second reduced pixel points, and the number of the first reduced pixel points and the number of the second reduced pixel points are calculated once respectively only through the first reduced pixel point number calculation module and the second reduced pixel point number calculation module, repeated calculation is not needed, so that the use of a divider and a multiplier is greatly reduced, and the occupation of resources is reduced.
Preferably, the image reduction system further includes an interval value calculation module, and the interval value calculation module is configured to perform second division processing on the second number of transform operations and the first number of transform operations to obtain an interval value.
Drawings
FIG. 1 is a flow chart of an image reduction method of the present invention;
fig. 2 is a block diagram showing the configuration of an image reducing system according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings of the present invention, and it is obvious that the described embodiments are some, but not all embodiments of the present invention. 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 invention. Unless defined otherwise, technical or scientific terms used herein shall have the ordinary meaning as understood by one of ordinary skill in the art to which this invention belongs. As used herein, the word "comprising" and similar words are intended to mean that the element or item listed before the word covers the element or item listed after the word and its equivalents, but does not exclude other elements or items.
To solve the problems in the prior art, an embodiment of the present invention provides an image reduction method, which includes, with reference to fig. 1, the following steps:
s1: performing complementation processing on the pixel points of the source image and the target image in the first direction to obtain a first transformation operation frequency;
s2: subtracting the number of pixel points in the first direction of the target image and the first transformation operation frequency to obtain a second transformation operation frequency;
s3: performing first division processing on the pixel points of the source image and the target image in the first direction to obtain second reduced pixel points;
s4: multiplying the number of the reduced pixel points of the second transformation operation and the number of times of the second transformation operation to obtain a first intermediate value;
s5: subtracting the number of pixel points in the first direction of the source image and the first intermediate value to obtain a second intermediate value;
s6: performing second division processing on the second intermediate value and the first transformation operation times to obtain a first reduced pixel point number;
s7: and reducing continuous pixel points to 1 point by pixel points in the first direction of the source image according to the number of the first reduced pixel points and the number of the second reduced pixel points so as to obtain an intermediate image of the source image reduced in the first direction.
In some embodiments of the present invention, the image reduction method further includes performing the same processing as the first direction on the intermediate image in a second direction to obtain the target image.
In some embodiments of the invention, the first direction and the second direction are a long direction and a wide direction of the source image, respectively.
In some embodiments of the invention, the first division process rounds down.
In some embodiments of the present invention, the image reduction method further includes performing a second division process on the second number of transform operations and the first number of transform operations to obtain an interval value.
In some embodiments of the invention, the second division process rounds down or rounds up to obtain the interval number of times.
In some embodiments of the present invention, the second transform operation of the interval number is a one-time continuous transform operation, and in step S7, the continuous transform operation and the first transform operation are performed alternately.
FIG. 2 is a block diagram of an image reduction system in some embodiments of the invention. Referring to fig. 2, the image reduction system 10 includes a first conversion operation frequency calculation module 11, a second conversion operation frequency calculation module 12, a first reduced pixel point number calculation module 13, a second reduced pixel point number calculation module 14, and a pixel point reduction module 15, where the first reduced pixel point number calculation module 13 includes a first intermediate value calculation unit 131, a second intermediate value calculation unit 132, and a result calculation unit 133, and the first conversion operation frequency calculation module 11 is configured to perform a remainder processing on the pixel points in the first direction of the source image and the target image to obtain a first conversion operation frequency; the second transform operation frequency calculation module 12 is configured to subtract the number of pixels in the first direction of the target image and the first transform operation frequency to obtain a second transform operation frequency; the second reduced pixel point number calculating module 14 is configured to perform a first division process on the pixel points in the first direction of the source image and the target image to obtain second reduced pixel points; the first intermediate value calculating unit 131 is configured to multiply the number of reduced pixel points of the second transform operation and the number of times of the second transform operation to obtain a first intermediate value; the second intermediate value calculating unit 132 is configured to subtract the number of pixels in the first direction of the source image and the first intermediate value to obtain a second intermediate value; the result calculating unit 133 is configured to perform a second division process on the second intermediate value and the first transform operation frequency to obtain a first reduced pixel point number; the pixel point reduction module 15 is configured to reduce the number of the pixel points in the first direction of the source image into 1 point according to the number of the first reduced pixel points and the number of the second reduced pixel points, so as to obtain an intermediate image in which the source image is reduced in the first direction.
In some embodiments of the present invention, the image reduction system further includes an interval value calculation module, and the interval value calculation module is configured to perform a second division process on the second number of transform operations and the first number of transform operations to obtain an interval value.
In some embodiments of the present invention, the image reduction system further comprises a source image and target image pixel information input unit for inputting pixel information of the source image and the target image.
In some embodiments of the present invention, a source image with a pixel of 1280 × 720 is reduced to a target image with a pixel of 416 × 416, taking the reduction of the length of the source image to the length of the target image, that is, 1280 is reduced to 416, where the image reduction method specifically includes the following steps:
s11: performing complementation processing on 1280 and 416 to obtain that the number of times of the first transformation operation is 32;
s12: subtracting 416 and 32 to obtain 384 times of second transformation operation;
s13: dividing 1280 and 416 to obtain a second reduced pixel point number of 3;
s14: multiplying 3 and 384 to obtain a first intermediate value of 1152;
s15: subtracting 1280 and 1152 to obtain a second intermediate value of 128;
s16: dividing 128 and 32 to obtain a first reduced pixel count of 4;
s17: reducing 1 st to 12 th pixel points on the same line in the longitudinal direction of the source image, reducing every continuous 3 pixel points into 1 pixel point, reducing 4 th pixel points from 13 th to 16 th into 1 pixel point, reducing 1 st to 28 th pixel points and every continuous 3 pixel points into 1 pixel point, reducing 4 th pixel points from 29 th to 32 th into 1 pixel point, sequentially executing until all the pixel points of 1280 are reduced, and obtaining a reduced intermediate image of the source image in the longitudinal direction. The reduction of the plurality of pixels to 1 pixel is a known technique in the art, and is not described herein again.
Although the embodiments of the present invention have been described in detail hereinabove, it is apparent to those skilled in the art that various modifications and variations can be made to these embodiments. However, it is to be understood that such modifications and variations are within the scope and spirit of the present invention as set forth in the following claims. Moreover, the invention as described herein is capable of other embodiments and of being practiced or of being carried out in various ways.
Claims (8)
1. An image reduction method, comprising the steps of:
s1: performing complementation processing on the pixel points of the source image and the target image in the first direction to obtain a first transformation operation frequency;
s2: subtracting the number of pixel points in the first direction of the target image and the first transformation operation frequency to obtain a second transformation operation frequency;
s3: performing first division processing on the pixel points of the source image and the target image in the first direction to obtain second reduced pixel points;
s4: multiplying the number of the reduced pixel points of the second transformation operation and the number of times of the second transformation operation to obtain a first intermediate value;
s5: subtracting the number of pixel points in the first direction of the source image and the first intermediate value to obtain a second intermediate value;
s6: performing second division processing on the second intermediate value and the first transformation operation times to obtain a first reduced pixel point number;
s7: and reducing continuous pixel points to 1 point by pixel points in the first direction of the source image according to the number of the first reduced pixel points and the number of the second reduced pixel points so as to obtain an intermediate image of the source image reduced in the first direction.
2. The image reduction method according to claim 1, further comprising performing the same processing as the first direction on the intermediate image in a second direction to obtain the target image.
3. The image reduction method according to claim 1, wherein the first division processing rounds down.
4. The image reduction method according to claim 1, further comprising performing a second division process on the second number of transform operations and the first number of transform operations to obtain an interval value.
5. The image reduction method according to claim 4, wherein the second division processing rounds down or rounds up to obtain the interval numerical times.
6. The image reduction method according to claim 4, wherein the second conversion operation of the interval numerical degree is a one-time continuous conversion operation, and in the step S7, the continuous conversion operation and the first conversion operation are alternately performed.
7. An image reduction system for realizing the image reduction method according to any one of claims 1 to 6, the image reduction system comprising a first conversion operation count calculation module, a second conversion operation count calculation module, a first reduced pixel point count calculation module, a second reduced pixel point count calculation module, and a pixel point reduction module, the first reduced pixel point count calculation module comprising a first intermediate value calculation unit, a second intermediate value calculation unit, and a result calculation unit,
the first transformation operation frequency calculation module is used for performing complementation processing on the pixel points of the source image and the target image in the first direction to obtain a first transformation operation frequency;
the second transformation operation frequency calculation module is used for subtracting the number of pixel points in the first direction of the target image and the first transformation operation frequency to obtain a second transformation operation frequency;
the second reduced pixel point number calculating module is used for performing first division processing on the pixel points of the source image and the target image in the first direction to obtain second reduced pixel points;
the first intermediate value calculation unit is configured to multiply the number of reduced pixel points of the second transform operation and the number of times of the second transform operation to obtain a first intermediate value;
the second intermediate value calculating unit is used for subtracting the number of the pixel points in the first direction of the source image and the first intermediate value to obtain a second intermediate value;
the result calculating unit is used for performing second division processing on the second intermediate value and the first transformation operation times to obtain a first reduced pixel point number;
the pixel point reduction module is used for reducing the pixel points of the source image in the first direction into 1 point according to the number of the first reduced pixel points and the number of the second reduced pixel points so as to obtain an intermediate image of the source image reduced in the first direction.
8. The image reduction system according to claim 7, further comprising an interval value calculation module configured to perform a second division process on the second number of transform operations and the first number of transform operations to obtain an interval value.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010118597.5A CN111340706B (en) | 2020-02-26 | 2020-02-26 | Image reduction method and image reduction system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010118597.5A CN111340706B (en) | 2020-02-26 | 2020-02-26 | Image reduction method and image reduction system |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111340706A CN111340706A (en) | 2020-06-26 |
CN111340706B true CN111340706B (en) | 2021-02-02 |
Family
ID=71181906
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010118597.5A Active CN111340706B (en) | 2020-02-26 | 2020-02-26 | Image reduction method and image reduction system |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111340706B (en) |
Family Cites Families (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US5883678A (en) * | 1995-09-29 | 1999-03-16 | Kabushiki Kaisha Toshiba | Video coding and video decoding apparatus for reducing an alpha-map signal at a controlled reduction ratio |
CN101221657A (en) * | 2008-01-24 | 2008-07-16 | 杭州华三通信技术有限公司 | Image zoom processing method and device |
JP2014082541A (en) * | 2012-10-12 | 2014-05-08 | National Institute Of Information & Communication Technology | Method, program and apparatus for reducing data size of multiple images including information similar to each other |
CN108064397B (en) * | 2017-08-11 | 2021-07-23 | 深圳前海达闼云端智能科技有限公司 | Method, crowdsourcing platform and system for establishing three-dimensional image model of object |
-
2020
- 2020-02-26 CN CN202010118597.5A patent/CN111340706B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111340706A (en) | 2020-06-26 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP2945487B2 (en) | Matrix multiplier | |
CN103366342B (en) | Be applied to the subsection linearity inser value method that video image amplifies | |
CN112997479A (en) | Method, system and computer readable medium for processing images across a phase jump connection | |
CN111340706B (en) | Image reduction method and image reduction system | |
CN109787760A (en) | A kind of key secret Enhancement Method and device based on H1 class hash function race of optimization | |
CN111724304A (en) | Image scaling method and device, terminal equipment and storage medium | |
CN108595146B (en) | Division operation method, device and equipment | |
CN101334985B (en) | Wave data displaying apparatus and method | |
CN105139346A (en) | Digital image processing method digital image processing device | |
CN109658332B (en) | Image amplification method and terminal based on streaming data processing | |
JPH06266747A (en) | Dct/inverse dct arithmetic unit | |
US6789097B2 (en) | Real-time method for bit-reversal of large size arrays | |
CN110717860B (en) | Image scaling processing method based on Newton's three-correlation-and-component type mixed rational interpolation | |
CN207369001U (en) | A kind of digital forming filter | |
CN110570444B (en) | Threshold calculation method based on Box Filter algorithm | |
CN111107034A (en) | System, method and computer-readable storage medium for reducing signal peak-to-average ratio | |
JP3514566B2 (en) | Division / Square root circuit | |
KR950010822B1 (en) | Exclusive logic adding system and its method of binary level logic and multiple level logic | |
Kim et al. | Multiplier with Parallel CSA using CRT’s Specific Moduli (2 k-1, 2 k, 2 k+ 1) | |
CN117828234A (en) | Data processing method, device, processor, computing equipment and storage medium | |
CN115278245A (en) | Context adaptive arithmetic coding and decoding method | |
JPH1117931A (en) | Pixel density converter | |
JP3566568B2 (en) | Sample data string conversion method, distribution point value calculation method, sample data division method, and program recording medium | |
CN115906930A (en) | Neural network acceleration method, accelerator, electronic device and storage medium | |
KR0146654B1 (en) | Multi-nary exclusive or logic device |
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 | ||
CP03 | Change of name, title or address |
Address after: 200434 Room 202, building 5, No. 500, Memorial Road, Hongkou District, Shanghai Patentee after: Shanghai Anlu Information Technology Co.,Ltd. Address before: Room 501-504, building 9, Pudong Software Park, 498 GuoShouJing Road, Pudong New Area, Shanghai 200082 Patentee before: SHANGHAI ANLOGIC INFORMATION TECHNOLOGY Co.,Ltd. |
|
CP03 | Change of name, title or address |