CN110232657A - A kind of image-scaling method, device, equipment and medium - Google Patents
A kind of image-scaling method, device, equipment and medium Download PDFInfo
- Publication number
- CN110232657A CN110232657A CN201910522113.0A CN201910522113A CN110232657A CN 110232657 A CN110232657 A CN 110232657A CN 201910522113 A CN201910522113 A CN 201910522113A CN 110232657 A CN110232657 A CN 110232657A
- Authority
- CN
- China
- Prior art keywords
- subimage block
- image
- format
- scaling
- low resolution
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 79
- 102100039334 HAUS augmin-like complex subunit 1 Human genes 0.000 claims abstract description 93
- 101100177185 Homo sapiens HAUS1 gene Proteins 0.000 claims abstract description 93
- 230000015654 memory Effects 0.000 claims abstract description 55
- 238000003860 storage Methods 0.000 claims abstract description 19
- 238000009826 distribution Methods 0.000 claims description 3
- 239000000203 mixture Substances 0.000 claims description 3
- 230000008569 process Effects 0.000 abstract description 25
- 230000009467 reduction Effects 0.000 abstract description 10
- 230000010354 integration Effects 0.000 abstract description 9
- 230000009286 beneficial effect Effects 0.000 abstract description 3
- 230000006835 compression Effects 0.000 description 6
- 238000007906 compression Methods 0.000 description 6
- 238000010168 coupling process Methods 0.000 description 3
- 238000005859 coupling reaction Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 2
- 230000008878 coupling Effects 0.000 description 2
- 230000002093 peripheral effect Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000007812 deficiency Effects 0.000 description 1
- 238000000151 deposition Methods 0.000 description 1
- 235000013399 edible fruits Nutrition 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 238000000802 evaporation-induced self-assembly Methods 0.000 description 1
- 239000012634 fragment Substances 0.000 description 1
- 230000006870 function Effects 0.000 description 1
- 238000003709 image segmentation Methods 0.000 description 1
- 238000005192 partition Methods 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/60—Memory management
-
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T9/00—Image coding
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20212—Image combination
- G06T2207/20221—Image fusion; Image merging
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Multimedia (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a kind of image-scaling method, device, equipment and medium, the step of this method includes: to obtain subimage block generated when saving HEIC format-pattern;Processing is zoomed in and out to each subimage block, generates corresponding low resolution subimage block;Each low resolution subimage block is integrated into thumbnail image.Since this method is the integration carried out for low resolution subimage block, therefore the occupied memory size of each pixel is relatively smaller, relative reduction to HEIC format-pattern zooms in and out the occupancy degree in treatment process to memory headroom, and then ensures the system overall stability that treatment process is zoomed in and out to HEIC format-pattern.In addition, the present invention also provides a kind of image scaling device, equipment and computer readable storage medium, beneficial effect is same as above.
Description
Technical field
The present invention relates to image scaling fields, more particularly to a kind of image-scaling method, device, equipment and medium.
Background technique
Current HEIC format-pattern when stored, often in advance will be complete according to certain grid (GRID) size
HEIC format-pattern is divided into multiple corresponding subimage blocks and is saved, and then when obtaining HEIC format-pattern, need by
Its corresponding multiple subimage block decodes respectively, and the relative position sequence integration according to subimage block in HEIC format-pattern
For complete HEIC format-pattern.
Since the image resolution ratio that the display equipment of current main-stream can be shown is limited, work as the ruler of HEIC format-pattern
When very little larger, need by HEIC format-pattern is zoomed in and out and can normally be shown.Currently for HEIC format-pattern into
The mode of row scaling, is that first will be integrated into complete HEIC format chart based on each subimage block that HEIC format-pattern divides
Picture, and then processing is zoomed in and out to complete HEIC format-pattern again, ultimately generate the thumbnail image of low-resolution format.But
Since the resolution ratio of HEIC format-pattern is higher, when HEIC picture size is larger, with distant view photograph (16374 × 3692)
For, if being stored in memory with each pixel with RGBA format is full-scale, it is required in save as 16374 × 3692 × 4
(230.6MB) byte, therefore very big occupancy can be caused to memory headroom, it is difficult to ensure HEIC format-pattern is zoomed in and out
The overall stability for the treatment of process.
It can be seen that providing a kind of image-scaling method, HEIC format-pattern is zoomed in and out with relative reduction processed
To the occupancy degree of memory headroom in journey, and then ensure to zoom in and out HEIC format-pattern the overall stability for the treatment of process,
It is those skilled in the art's problem to be solved.
Summary of the invention
The object of the present invention is to provide a kind of image-scaling method, device, equipment and media, with relative reduction to HEIC lattice
Formula image zooms in and out the occupancy degree in treatment process to memory headroom, and then ensures to zoom in and out place to HEIC format-pattern
The system overall stability of reason process.
In order to solve the above technical problems, the present invention provides a kind of image-scaling method, comprising:
Obtain subimage block generated when saving HEIC format-pattern;
Processing is zoomed in and out to each subimage block, generates corresponding low resolution subimage block;
Each low resolution subimage block is integrated into thumbnail image.
Preferably, processing is zoomed in and out to each subimage block, generates corresponding low resolution subimage block, comprising:
The target size of thumbnail image and the actual size of HEIC format-pattern are obtained, and according to target size and reality
Size calculates pantograph ratio;
Processing is zoomed in and out to each subimage block according to pantograph ratio, generates corresponding low resolution subimage block;
Correspondingly, each low resolution subimage block is integrated into thumbnail image, comprising:
Obtain column locations of each subimage block in HEIC format-pattern;
Each low resolution subimage block is connected with each other according to the column locations of corresponding subimage block, and is integrated into thumbnail
Picture.
Preferably, processing is being zoomed in and out to each subimage block according to pantograph ratio, is generating corresponding low resolution subgraph
Before block, method further include:
According to the target memory space of the target size of thumbnail image and resolution ratio distribution respective volume;
Correspondingly, zooming in and out processing to each subimage block according to pantograph ratio, corresponding low resolution subimage block is generated,
Include:
Processing is zoomed in and out to each subimage block according to pantograph ratio based on target memory space, generates corresponding low resolution
Subimage block.
Preferably, the format of low resolution subimage block includes JPG format.
Preferably, processing is zoomed in and out to each subimage block, generates corresponding low resolution subimage block, comprising:
Processing is zoomed in and out to each subimage block by way of multithreading, generates corresponding low resolution subimage block.
Preferably, subimage block generated when saving HEIC format-pattern is obtained, comprising:
Subimage block generated when saving HEIC format-pattern is obtained based on H265 code stream.
In addition, device includes memory, processor and bus, memory the present invention also provides a kind of image scaling device
On be stored with the image scaling program that can be run to processor and on a processor by bus transfer, image scaling program is processed
Such as above-mentioned image-scaling method is realized when device executes.
Preferably, device is the node for forming CDN network or block chain network.
In addition, the present invention also provides a kind of image scaling system, system includes:
Subimage block acquiring unit saves subimage block generated when HEIC format-pattern for obtaining;
Subimage block unit for scaling generates corresponding low resolution subgraph for zooming in and out processing to each subimage block
As block;
Image block integrates module, for each low resolution subimage block to be integrated into thumbnail image.
In addition, the present invention also provides a kind of computer program product, including computer instruction, when it runs on computers
When, allow computer to execute above-mentioned image-scaling method.
In addition, being stored with figure on computer readable storage medium the present invention also provides a kind of computer readable storage medium
As scaling program, image scaling program can be executed by one or more processor, to realize such as above-mentioned image-scaling method.
Image-scaling method provided by the present invention obtains subgraph generated when saving HEIC format-pattern first
Block, and then processing is zoomed in and out to each subimage block, corresponding low resolution subimage block is generated, finally by each low resolution
Image block is integrated into the lower thumbnail image of resolution ratio.This method is first to contract to each subimage block of HEIC format-pattern
Processing is put, and then the low resolution subimage block that scaling generates is subjected to integration again and generates thumbnail image, compared to the prior art
In for high-resolution subimage block is integrated, due to this method be for low resolution subimage block carry out it is whole
It closes, therefore the occupied memory size of each pixel is relatively smaller, and relative reduction zooms in and out HEIC format-pattern
To the occupancy degree of memory headroom in treatment process, and then ensure the system that treatment process is zoomed in and out to HEIC format-pattern
Overall stability.In addition, the present invention also provides a kind of image scaling device, equipment and computer readable storage medium, beneficial to effect
Fruit is same as above.
Detailed description of the invention
In order to illustrate the embodiments of the present invention more clearly, attached drawing needed in the embodiment will be done simply below
It introduces, it should be apparent that, drawings in the following description are only some embodiments of the invention, for ordinary skill people
For member, without creative efforts, it is also possible to obtain other drawings based on these drawings.
Fig. 1 is a kind of flow chart of image-scaling method provided in an embodiment of the present invention;
Fig. 2 is the flow chart of another image-scaling method provided in an embodiment of the present invention;
Fig. 3 is the flow chart of another image-scaling method provided in an embodiment of the present invention;
Fig. 4 is a kind of structure chart of image scaling device provided in an embodiment of the present invention.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are only a part of the embodiments of the present invention, rather than whole embodiments.Based on this
Embodiment in invention, those of ordinary skill in the art are without making creative work, obtained every other
Embodiment belongs to the scope of the present invention.
Since the image resolution ratio that the display equipment of current main-stream can be shown is limited, work as the ruler of HEIC format-pattern
When very little larger, need by HEIC format-pattern is zoomed in and out and can normally be shown.Currently for HEIC format-pattern into
The mode of row scaling, is that first will be integrated into complete HEIC format chart based on each subimage block that HEIC format-pattern divides
Picture, and then processing is zoomed in and out to complete HEIC format-pattern again, ultimately generate the thumbnail image of low-resolution format.But
Since the resolution ratio of HEIC format-pattern is higher, when HEIC picture size is larger, with distant view photograph (16374 × 3692)
For, if being stored in memory with each pixel with RGBA format is full-scale, it is required in save as 16374 × 3692 × 4
(230.6MB) byte, therefore very big occupancy can be caused to memory headroom, it is difficult to ensure HEIC format-pattern is zoomed in and out
The system overall stability for the treatment of process.
Core of the invention is to provide a kind of image-scaling method, zooms in and out place to HEIC format-pattern with relative reduction
To the occupancy degree of memory headroom during reason, and then the system for ensuring to zoom in and out HEIC format-pattern treatment process is whole
Stability.In addition, the present invention also provides a kind of image scaling device, equipment and computer readable storage medium, beneficial effect is same
It is upper described.
In order to enable those skilled in the art to better understand the solution of the present invention, with reference to the accompanying drawings and detailed description
The present invention is described in further detail.
Fig. 1 is a kind of flow chart of image-scaling method provided in an embodiment of the present invention.Referring to FIG. 1, image scaling side
The specific steps of method include:
Step S10: subimage block generated when saving HEIC format-pattern is obtained.
It should be noted that HEIC format, i.e. High Efficiency Image Compression format, high-performance
Compression of images, also known as HEIF, for the picture format of new generation for replacing jpeg.The picture format is using H265 coding mode to image
Fragment compression is carried out, compression performance is better than JPG.
Subimage block in this step is the concrete form taken when HEIC format-pattern is saved, that is to say, that
When being saved to HEIC format-pattern, be HEIC format-pattern is first divided into subimage block, then saved, therefore this
Subimage block generated when saving HEIC format-pattern is obtained in step, is also equivalent to obtain the HEIC format pre-saved
Image, but be emphasized that and only obtain subimage block not can completely display HEIC format-pattern, it is merely able to based on son
Image block realizes the relevant treatment operations to its corresponding complete HEIC format-pattern.
Step S11: zooming in and out processing to each subimage block, generates corresponding low resolution subimage block.
It should be noted that in Computer Image Processing and computer graphics, image scaling (imagescaling)
Refer to the process of and the size of digital picture is adjusted.This step is to be directed to each subimage block to zoom in and out place
Reason, generates the lower low resolution subimage block of resolution ratio with this, the purpose zoomed in and out is leads higher for script resolution ratio
Cause the subimage block that can not show to carry out the processing of loss resolution ratio, with this ensure subimage block after scaling can normally with compared with
Low resolution ratio is shown.It is emphasized that the scaling processing in this step, is reduction while reducing subimage block size
The resolution ratio of subimage block.
Step S12: each low resolution subimage block is integrated into thumbnail image.
Since the display of HEIC format-pattern is needed based on the integration processing between subimage block, similarly, for
HEIC format-pattern zooms in and out the thumbnail image of processing, needs to be integrally formed based on each low resolution subimage block.It is each low
The mode for being integrated into whole thumbnail image between resolution level subimage, can be according to the correspondence between low resolution subgraph
Positional relationship is integrated into thumbnail image, is also possible to limiting thumbnail image laterally or longitudinally included low resolution subgraph quantity
It is technical, according to each low resolution subgraph number order splicing be integrated into thumbnail image.It specifically should be according to practical application
Depending on scene and actual demand, it is not specifically limited herein.
Image-scaling method provided by the present invention obtains subgraph generated when saving HEIC format-pattern first
Block, and then processing is zoomed in and out to each subimage block, corresponding low resolution subimage block is generated, finally by each low resolution
Image block is integrated into the lower thumbnail image of resolution ratio.This method is first to contract to each subimage block of HEIC format-pattern
Processing is put, and then the low resolution subimage block that scaling generates is subjected to integration again and generates thumbnail image, compared to the prior art
In for high-resolution subimage block is integrated, due to this method be for low resolution subimage block carry out it is whole
It closes, therefore the occupied memory size of each pixel is relatively smaller, and relative reduction zooms in and out HEIC format-pattern
To the occupancy degree of memory headroom in treatment process, and then ensure the system that treatment process is zoomed in and out to HEIC format-pattern
Overall stability.
As a preferred embodiment, the format of low resolution subimage block includes JPG format.
It should be noted that JPG format is very universal picture format, it also can be just in most computer equipments
Often the image of display JPG format, user can also arbitrarily set compression degree to retain image quality, be that one kind is very easily schemed
As format, also, the image of JPG format capacity for the image of other formats is smaller, opposite can save for depositing
Store up the occupancy in space.
As a preferred embodiment, zooming in and out processing to each subimage block, corresponding low resolution is generated
Image block, comprising:
Processing is zoomed in and out to each subimage block by way of multithreading, generates corresponding low resolution subimage block.
It should be noted that multithreading, refers to the technology for realizing that multiple threads are concurrently executed from software or hardware, i.e.,
Computer with multithreading ability can execute the thread of more than one quantity in the same time due to having hardware supported.This reality
It applies mode and processing is zoomed in and out to each subimage block by way of multithreading, opposite improve zooms in and out subimage block
The whole efficiency of processing.
On the basis of the above embodiments, the present invention also provides a series of preferred embodiments.
Fig. 2 is the flow chart of another image-scaling method provided in an embodiment of the present invention.Referring to FIG. 2, image scaling
The specific steps of method include:
Step S20: subimage block generated when saving HEIC format-pattern is obtained.
Step S21: the target size of thumbnail image and the actual size of HEIC format-pattern are obtained, and according to target ruler
It is very little to calculate pantograph ratio with actual size.
Step S22: processing is zoomed in and out to each subimage block according to pantograph ratio, generates corresponding low resolution subgraph
Block.
It should be noted that the present embodiment during zooming in and out processing to each subimage block, obtains institute first
The target size for the thumbnail image for needing to generate and the actual size of HEIC format-pattern, and then calculate target size and reality
Size scaling ratio and pantograph ratio between size, so according to pantograph ratio to each subimage block in length and width
The size scaling of same ratio is carried out, and then generates corresponding low resolution subimage block.
Step S23: column locations of each subimage block in HEIC format-pattern are obtained.
Step S24: each low resolution subimage block is connected with each other according to the column locations of corresponding subimage block, and is integrated
For thumbnail image.
The present embodiment is obtained by HEIC format first during low resolution subimage block is integrated into thumbnail image
Column locations of each subimage block that image segmentation generates in HEIC format-pattern, that is, each subimage block and other subgraphs
As the relative position between block, since low resolution subimage block is to zoom in and out processing based on subimage block to generate,
Relative position of the low resolution subimage block in thumbnail image should exist with subimage block corresponding to the low resolution subimage block
Relative position in HEIC format-pattern is consistent, therefore the present embodiment is obtaining row of each subimage block in HEIC format-pattern
After column position, each low resolution subimage block is connected with each other according to the column locations of corresponding subimage block, and be integrated into breviary
Image.
The present embodiment is based on pantograph ratio and zooms in and out processing to each subimage block, opposite can avoid low point generated
Distinguish that the case where deforming or being distorted occurs in subimage block content, in addition, by each low resolution subimage block according to corresponding subimage block
Column locations be connected with each other, and be integrated into thumbnail image, opposite can ensure the content integrity of thumbnail image and available
Property.
Fig. 3 is the flow chart of another image-scaling method provided in an embodiment of the present invention.Referring to FIG. 3, image scaling
The specific steps of method include:
Step S30: subimage block generated when saving HEIC format-pattern is obtained.
Step S31: the target size of thumbnail image and the actual size of HEIC format-pattern are obtained, and according to target ruler
It is very little to calculate pantograph ratio with actual size.
Step S32: according to the target memory space of the target size of thumbnail image and resolution ratio distribution respective volume.
Step S33: processing is zoomed in and out to each subimage block according to pantograph ratio based on target memory space, is generated corresponding
Low resolution subimage block.
Step S34: column locations of each subimage block in HEIC format-pattern are obtained.
Step S35: each low resolution subimage block is connected with each other according to the column locations of corresponding subimage block, and is integrated
For thumbnail image.
It should be noted that the target size and resolution ratio point focused on previously according to thumbnail image of the present embodiment
Target memory space with respective volume, for the thumbnail image of different resolution ratio, the load of each pixel is needed
The memory size to be occupied has differences, therefore embodiment distributes phase according to the target size and resolution ratio of thumbnail image
The target memory space of capacity is answered, and then each subimage block is carried out according to pantograph ratio based on pre-assigned target memory space
Scaling processing generates corresponding low resolution subimage block.The present embodiment passes through interior required for thumbnail image to generating in advance
It deposits space to be divided, opposite the situation of memory available space deficiency during generating thumbnail image can be avoided to generate,
The opposite global reliability for ensuring thumbnail image generating process.
On the basis of a series of above-mentioned embodiments, HEIC format is saved as a preferred embodiment, obtaining
Subimage block generated when image, comprising:
Subimage block generated when saving HEIC format-pattern is obtained based on H265 code stream.
H.265 code stream is compared to coding quality, delay and the algorithm complexity for improving code stream opposite for H.264 code stream
Between relationship, being optimal setting, when improving compression efficiency, robustness and error recovery capabilities, reducing real-time
Prolong, channel acquisition time and random access time delay and reduce complexity.Therefore present embodiment is based on H265 code stream energy
It reaches more efficient and reliably gets subimage block generated when saving HEIC format-pattern.
The scene embodiment that the present invention also provides a kind of under concrete application scene, the implementation procedure of scene embodiment is such as
Under:
1, HEIC image is parsed, HEIC image length/width (w/h) and subimage block length/width (sw/sh), subimage block are obtained
The information such as number and subimage block ranks number (tw/th) obtain the H265 code stream of each subimage block of picture.
2, selection needs the actual size x*y exported, calculates pantograph ratio scale=w*h/x*y.Distribute the interior of x*y*3/2
S (each pixel committed memory space of the image of JPG format is 3/2M) is deposited, S is respectively for saving tw*th length/width
The subgraph of (sw/scale, sh/scale);
3, the code stream that multithreading decodes each subimage block obtains the subgraph of sw*sh, subgraph is zoomed in and out grown/
Width is respectively the image of (sw/scale, sh/scale), and directly zooms to corresponding position in memory S.
4, image after scaling is saved as in memory S, be can be converted RGBA data and is protected for showing or being encoded to JPG figure
It deposits.
1024x256 is shown dimensions as by taking distant view photograph (16374 × 3692) as an example based on above-mentioned implementation procedure, this
1024x256x1.5 byte (0.375MB) is saved as in needed for method, only (does not consider other memories from decoded image EMS memory occupation
Consumption) and it is nearly 600 times of scheme (16374 × 3692 × 4) reduction former.
Based on above-mentioned implementation procedure:
7630*4912 size (8K) scene: EMS memory occupation is down to 0.9% by 5.3%
16382*3628 (distant view photograph) scene: EMS memory occupation is down to 1.0% by 9.0%
15360*8640 (16K image) scene: EMS memory occupation is down to 1.4% by 16.1%
The above comparison, the bigger this programme of HEIC format-pattern size are saved memory and are more obvious.
Hereinbefore the embodiment of image-scaling method is described in detail, the present invention also provides one kind and is somebody's turn to do
The corresponding image scaling device of method, since the embodiment of image scaling device part and the embodiment of method part are mutually right
It answers, the embodiment of image scaling device part refers to the description of the embodiment of method part, wouldn't repeat here.
Fig. 4 is a kind of structure chart of image scaling device provided in an embodiment of the present invention.
Referring to FIG. 4, a kind of image scaling device 1 provided in an embodiment of the present invention, image scaling device 1 includes memory
11, processor 12 and bus 13, processor 12 can be transmitted to by bus 13 and transport on the processor 12 by being stored on memory 11
Capable image scaling program realizes such as above-mentioned image-scaling method when image scaling program is executed by processor 12.
The image scaling device 1 can be the node of composition CDN network or block chain network.It can be composition CDN net
The node of network or block chain network.
Wherein, memory 11 includes at least a type of readable storage medium storing program for executing, and readable storage medium storing program for executing includes flash memory, hard
Disk, multimedia card, card-type memory (for example, SD or DX memory etc.), magnetic storage, disk, CD etc..Memory 11 exists
It can be the internal storage unit of image scaling device 1, such as the hard disk of the image scaling device 1 in some embodiments.Storage
Device 11 is also possible to match on the External memory equipment of image scaling device 1, such as image scaling device 1 in further embodiments
Standby plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD)
Card, flash card (Flash Card) etc..Further, memory 11 can also both include the storage inside of image scaling device 1
Unit also includes External memory equipment.Memory 11 can be not only used for the application software that storage is installed on image scaling device 1
And Various types of data, such as the code of video code conversion program etc., it can be also used for temporarily storing and exported or will export
Data.
Processor 12 can be in some embodiments a central processing unit (Central Processing Unit,
CPU), controller, microcontroller, microprocessor or other data processing chips, the program for being stored in run memory 11
Code or processing data, such as execute video code conversion program etc..
The bus 13 can be Peripheral Component Interconnect standard (peripheral component interconnect, abbreviation
PCI) bus or expanding the industrial standard structure (extended industry standard architecture, abbreviation EISA)
Bus etc..The bus can be divided into address bus, data/address bus, control bus etc..For convenient for indicating, in Fig. 4 only with one slightly
Line indicates, it is not intended that an only bus or a type of bus.
Image scaling device provided by the present invention obtains subgraph generated when saving HEIC format-pattern first
Block, and then processing is zoomed in and out to each subimage block, corresponding low resolution subimage block is generated, finally by each low resolution
Image block is integrated into the lower thumbnail image of resolution ratio.The present apparatus is first to contract to each subimage block of HEIC format-pattern
Processing is put, and then the low resolution subimage block that scaling generates is subjected to integration again and generates thumbnail image, compared to the prior art
In for high-resolution subimage block is integrated, due to the present apparatus be for low resolution subimage block carry out it is whole
It closes, therefore the occupied memory size of each pixel is relatively smaller, and relative reduction zooms in and out HEIC format-pattern
To the occupancy degree of memory headroom in treatment process, and then ensure the system that treatment process is zoomed in and out to HEIC format-pattern
Overall stability.
The present invention also provides a kind of image scaling system, system includes:
Subimage block acquiring unit saves subimage block generated when HEIC format-pattern for obtaining;
Subimage block unit for scaling generates corresponding low resolution subgraph for zooming in and out processing to each subimage block
As block;
Image block integrates module, for each low resolution subimage block to be integrated into thumbnail image.
Image scaling system provided by the present invention obtains subgraph generated when saving HEIC format-pattern first
Block, and then processing is zoomed in and out to each subimage block, corresponding low resolution subimage block is generated, finally by each low resolution
Image block is integrated into the lower thumbnail image of resolution ratio.This system is first to contract to each subimage block of HEIC format-pattern
Processing is put, and then the low resolution subimage block that scaling generates is subjected to integration again and generates thumbnail image, compared to the prior art
In for high-resolution subimage block is integrated, due to this system be for low resolution subimage block carry out it is whole
It closes, therefore the occupied memory size of each pixel is relatively smaller, and relative reduction zooms in and out HEIC format-pattern
To the occupancy degree of memory headroom in treatment process, and then ensure the system that treatment process is zoomed in and out to HEIC format-pattern
Overall stability.
In addition, being stored with fortune on computer readable storage medium the present invention also provides a kind of computer readable storage medium
Terminal data processing program is calculated, operation terminal data processing program can be executed by one or more processor, as above to realize
The image-scaling method stated.
Computer readable storage medium provided by the present invention obtains son generated when saving HEIC format-pattern first
Image block, and then processing is zoomed in and out to each subimage block, corresponding low resolution subimage block is generated, finally by each low resolution
Rate subimage block is integrated into the lower thumbnail image of resolution ratio.This computer readable storage medium is first to HEIC format-pattern
Each subimage block zooms in and out processing, and then the low resolution subimage block that scaling generates is carried out integration again and generates thumbnail
Picture, compared to the prior art in for high-resolution subimage block is integrated, due to this computer readable storage medium
It is the integration carried out for low resolution subimage block, therefore the occupied memory size of each pixel is relatively smaller, phase
Occupancy degree in treatment process to memory headroom is zoomed in and out to HEIC format-pattern to reducing, and then is ensured to HEIC
Format-pattern zooms in and out the system overall stability for the treatment of process.
In the above-described embodiments, can come wholly or partly by software, hardware, firmware or any combination thereof real
It is existing.When implemented in software, it can entirely or partly realize in the form of a computer program product.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In several embodiments provided herein, it should be understood that disclosed system, device and method can be with
It realizes by another way.For example, the apparatus embodiments described above are merely exemplary, for example, the unit
It divides, only a kind of logical function partition, there may be another division manner in actual implementation, such as multiple units or components
It can be combined or can be integrated into another system, or some features can be ignored or not executed.Another point, it is shown or
The mutual coupling, direct-coupling or communication connection discussed can be through some interfaces, the indirect coupling of device or unit
It closes or communicates to connect, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It should be noted that the serial number of the above embodiments of the invention is only for description, do not represent the advantages or disadvantages of the embodiments.And
The terms "include", "comprise" herein or any other variant thereof is intended to cover non-exclusive inclusion, so that packet
Process, device, article or the method for including a series of elements not only include those elements, but also including being not explicitly listed
Other element, or further include for this process, device, article or the intrinsic element of method.Do not limiting more
In the case where, the element that is limited by sentence "including a ...", it is not excluded that including process, device, the article of the element
Or there is also other identical elements in method.
The above is only a preferred embodiment of the present invention, is not intended to limit the scope of the invention, all to utilize this hair
Equivalent structure or equivalent flow shift made by bright specification and accompanying drawing content is applied directly or indirectly in other relevant skills
Art field, is included within the scope of the present invention.
Claims (10)
1. a kind of image-scaling method characterized by comprising
Obtain subimage block generated when saving HEIC format-pattern;
Processing is zoomed in and out to each subimage block, generates corresponding low resolution subimage block;
Each low resolution subimage block is integrated into thumbnail image.
2. image-scaling method according to claim 1, which is characterized in that described to be zoomed in and out to each subimage block
Processing, generates corresponding low resolution subimage block, comprising:
The target size of the thumbnail image and the actual size of the HEIC format-pattern are obtained, and according to the target ruler
It is very little to calculate pantograph ratio with the actual size;
The scaling processing is carried out to each subimage block according to the pantograph ratio, generates corresponding low resolution subgraph
Block;
Correspondingly, described be integrated into thumbnail image for each low resolution subimage block, comprising:
Obtain column locations of each subimage block in the HEIC format-pattern;
Each low resolution subimage block is connected with each other according to the column locations of the correspondence subimage block, and is integrated
For the thumbnail image.
3. image-scaling method according to claim 2, which is characterized in that it is described according to the pantograph ratio to each described
Subimage block carries out the scaling processing, before generating corresponding low resolution subimage block, the method also includes:
According to the target memory space of the target size of the thumbnail image and resolution ratio distribution respective volume;
Correspondingly, described carry out the scaling processing to each subimage block according to the pantograph ratio, generate low point corresponding
Resolution subimage block, comprising:
The scaling processing is carried out to each subimage block according to the pantograph ratio based on the target memory space, generates phase
The low resolution subimage block answered.
4. image-scaling method according to claim 1, which is characterized in that the format packet of the low resolution subimage block
Include JPG format.
5. image-scaling method according to claim 1, which is characterized in that described to be zoomed in and out to each subimage block
Processing, generates corresponding low resolution subimage block, comprising:
The scaling processing is carried out to each subimage block by way of multithreading, generates corresponding low resolution subgraph
Block.
6. according to claim 1 to image-scaling method described in 5 any one, which is characterized in that the acquisition saves HEIC
Subimage block generated when format-pattern, comprising:
Subimage block generated when saving the HEIC format-pattern is obtained based on H265 code stream.
7. a kind of image scaling device, which is characterized in that described device includes memory, processor and bus, the memory
On be stored with the image scaling program that can be run to the processor and on the processor by the bus transfer, the figure
Such as image-scaling method as claimed in any one of claims 1 to 6 is realized when being executed as scaling program by the processor.
8. device according to claim 7, which is characterized in that described device is composition CDN network or block chain network
Node.
9. a kind of image scaling system, which is characterized in that the system comprises:
Subimage block acquiring unit saves subimage block generated when HEIC format-pattern for obtaining;
Subimage block unit for scaling generates corresponding low resolution subgraph for zooming in and out processing to each subimage block
As block;
Image block integrates module, for each low resolution subimage block to be integrated into thumbnail image.
10. a kind of computer readable storage medium, which is characterized in that be stored with image contracting on the computer readable storage medium
Program is put, described image scaling program can be executed by one or more processor, to realize as any in claim 1 to 6
Image-scaling method described in.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910522113.0A CN110232657A (en) | 2019-06-17 | 2019-06-17 | A kind of image-scaling method, device, equipment and medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910522113.0A CN110232657A (en) | 2019-06-17 | 2019-06-17 | A kind of image-scaling method, device, equipment and medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110232657A true CN110232657A (en) | 2019-09-13 |
Family
ID=67860019
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910522113.0A Pending CN110232657A (en) | 2019-06-17 | 2019-06-17 | A kind of image-scaling method, device, equipment and medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110232657A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111275615A (en) * | 2020-01-08 | 2020-06-12 | 深圳市爱协生科技有限公司 | Video image scaling method based on bilinear interpolation improvement |
CN111860694A (en) * | 2020-07-31 | 2020-10-30 | 地平线(上海)人工智能技术有限公司 | Image processing method, and method and device for generating instruction for image processing |
Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102123259A (en) * | 2010-12-28 | 2011-07-13 | 四川长虹电器股份有限公司 | Method for displaying extra-large-resolution pictures on television |
CN103886624A (en) * | 2012-12-24 | 2014-06-25 | 三星电子(中国)研发中心 | JPEG image thumbnail extracting method |
CN105447034A (en) * | 2014-08-29 | 2016-03-30 | 富泰华工业(深圳)有限公司 | Method and system for generating picture thumbnail |
WO2017215587A1 (en) * | 2016-06-16 | 2017-12-21 | 华为技术有限公司 | Method and apparatus for encoding and decoding video image |
CN108346131A (en) * | 2018-01-26 | 2018-07-31 | 深圳开阳电子股份有限公司 | A kind of digital image scaling method, device and display equipment |
CN108510084A (en) * | 2018-04-04 | 2018-09-07 | 百度在线网络技术(北京)有限公司 | Method and apparatus for generating information |
CN109379591A (en) * | 2018-10-23 | 2019-02-22 | 深圳市网心科技有限公司 | Picture code-transferring method, electronic device and computer readable storage medium |
-
2019
- 2019-06-17 CN CN201910522113.0A patent/CN110232657A/en active Pending
Patent Citations (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102123259A (en) * | 2010-12-28 | 2011-07-13 | 四川长虹电器股份有限公司 | Method for displaying extra-large-resolution pictures on television |
CN103886624A (en) * | 2012-12-24 | 2014-06-25 | 三星电子(中国)研发中心 | JPEG image thumbnail extracting method |
CN105447034A (en) * | 2014-08-29 | 2016-03-30 | 富泰华工业(深圳)有限公司 | Method and system for generating picture thumbnail |
WO2017215587A1 (en) * | 2016-06-16 | 2017-12-21 | 华为技术有限公司 | Method and apparatus for encoding and decoding video image |
CN108346131A (en) * | 2018-01-26 | 2018-07-31 | 深圳开阳电子股份有限公司 | A kind of digital image scaling method, device and display equipment |
CN108510084A (en) * | 2018-04-04 | 2018-09-07 | 百度在线网络技术(北京)有限公司 | Method and apparatus for generating information |
CN109379591A (en) * | 2018-10-23 | 2019-02-22 | 深圳市网心科技有限公司 | Picture code-transferring method, electronic device and computer readable storage medium |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111275615A (en) * | 2020-01-08 | 2020-06-12 | 深圳市爱协生科技有限公司 | Video image scaling method based on bilinear interpolation improvement |
CN111860694A (en) * | 2020-07-31 | 2020-10-30 | 地平线(上海)人工智能技术有限公司 | Image processing method, and method and device for generating instruction for image processing |
WO2022021695A1 (en) * | 2020-07-31 | 2022-02-03 | 地平线(上海)人工智能技术有限公司 | Image processing method, and method and apparatus for generating instruction for image processing |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105120293B (en) | Image collaboration coding/decoding method and device based on CPU and GPU | |
TW315570B (en) | ||
US8947449B1 (en) | Color space conversion between semi-planar YUV and planar YUV formats | |
CN103609117B (en) | Code and decode the method and device of image | |
US20220337873A1 (en) | Techniques for encoding and decoding immersive video | |
US7720311B1 (en) | Memory and compute efficient block-based two-dimensional sample-rate converter for image/video applications | |
BRPI0606733A2 (en) | encoding device for encoding image data, encoding method for encoding image data, decoding device for decoding encoded data where image data was encoded, decoding method for decoding encoded data where image data was encoded, and, streaming | |
US7747097B2 (en) | Method for simple hardware implementation of JPEG size limiter | |
JP2005510981A (en) | Multi-channel video transcoding system and method | |
CN105072353B (en) | A kind of image decoding based on more GPU spells prosecutor method | |
CN110232657A (en) | A kind of image-scaling method, device, equipment and medium | |
CN103841359A (en) | Video multi-image synthesizing method, device and system | |
CN113347416B (en) | Chroma intra prediction method and device, and computer storage medium | |
CN105163126A (en) | Hardware decoding method and device based on HEVC protocol | |
US20200413086A1 (en) | Methods and apparatus for maximizing codec bandwidth in video applications | |
CN111510643A (en) | System and method for splicing panoramic image and close-up image | |
CN110505523A (en) | A kind of video code conversion priority orders control method and processing terminal | |
CN1926885B (en) | Video processing circuit and method of video processing | |
US20210233280A1 (en) | Encoding device control method and device, and storage medium | |
US7039242B2 (en) | Image processing device and image processing method | |
US8737469B1 (en) | Video encoding system and method | |
WO2020107319A1 (en) | Image processing method and device, and video processor | |
CN101847394B (en) | Storage mapping method and device for encoding and displaying video files | |
CN107426611B (en) | multi-path output method and system based on video transcoding | |
CN101556789B (en) | Image scaling control system and method |
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 | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190913 |
|
RJ01 | Rejection of invention patent application after publication |