Block mapping processing method, device and equipment for oversized picture data and medium

By combining chunked mapping and pixel point tracking technology for super-large images, the problems of high memory usage and low processing efficiency in the existing technology are solved, and stable and rapid processing of super-large images are achieved, and resource utilization and printing quality are improved.

CN120088119APending Publication Date: 2025-06-03XIAMEN HANIN CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510104446.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-23
Publication Date
2025-06-03

AI Technical Summary

Technical Problem

The prior art has problems such as high memory usage, low processing efficiency and poor data transmission stability when processing super large pictures, which affects printing speed, quality and production costs.

Method used

By chunking the super-large images into the memory mapping window, pixel point tracking technology and multi-threading processing technology are used to achieve stable, fast and accurate processing of super-large images.

Benefits of technology

Optimize the use of memory and disk resources, reduce memory usage, improve processing efficiency and resource utilization, meet the efficient and high-quality needs of industrial printing, and reduce production costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120088119A_ABST
    Figure CN120088119A_ABST
Patent Text Reader

Abstract

The invention provides a block mapping processing method and device for oversized picture data, equipment and a medium, and relates to the technical field of image processing. The method comprises the following steps: acquiring an original picture of oversized data and a target picture requirement; performing block sorting on the original picture so as to load the picture blocks in the memory mapping window; establishing a target picture of which the size is the same as that of the target picture, initializing the target picture into a background picture, and performing block sorting; according to the picture space transformation mode and the map drawing starting point, a map area occupied by the transformed map in the target picture is obtained, the pixel point tracking technology is adopted, the positions, corresponding to the original picture, of pixel points of the target picture are determined, and therefore pixel point information is obtained, and the target picture is drawn; and obtaining a complete target picture until the pixel points, corresponding to all the picture blocks in the target picture, in the mapping region are drawn. According to the method, the use of memory and disk resources is fully optimized, and stable, rapid and accurate processing of the oversized picture is realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of image processing, and more particularly, to a method, apparatus, device, and medium for block mapping processing of ultra-large image data. Background Art

[0002] Industrial printing is widely used in fields such as advertising and packaging, and the demand for large-format and high-precision printing is increasing. Before printing, it is necessary to perform mapping processing on one or more ultra-large images, and at the same time, certain transformations and processing need to be performed on each ultra-large image, such as rotation, mirroring, scaling, cropping, and continuous exposure of spatial changes, color adjustment of color changes, and channel number changes. However, the existing technologies have the following defects when processing ultra-large images:

[0003] (1) High memory occupancy: Loading the entire image at once easily leads to insufficient memory.

[0004] (2) Low processing efficiency: The operations are complex and the speed is slow.

[0005] (3) Insufficient resource utilization: Multicore or distributed resources are not fully utilized.

[0006] (4) Unstable data transmission: The transmission efficiency of large images is low and the stability is poor.

[0007] Among them, the problems of high memory occupancy and low processing efficiency are particularly prominent. These problems directly affect the printing speed, quality, and production cost, and it is urgent to study optimization solutions to improve the processing performance and resource utilization efficiency.

[0008] In view of this, the applicant has specifically proposed this application after studying the existing technologies. Summary of the Invention

[0009] The present invention aims to provide a method, apparatus, device, and medium for block mapping processing of ultra-large image data to solve the deficiencies in high memory occupancy, low processing efficiency, and poor data transmission stability in the existing methods.

[0010] To solve the above technical problems, the present invention is achieved through the following technical solutions:

[0011] A method for block mapping processing of ultra-large image data includes:

[0012] Obtaining the original image of the ultra-large data and the requirements of the target image; wherein, the requirements of the target image include: the image spatial transformation method, the size of the target image, and the starting point of mapping drawing; the starting point of mapping drawing is used to obtain the position correspondence between the pixel points in the target image and the transformed mapping; the transformed mapping is the process image obtained by transforming the original image according to the image spatial transformation method;

[0013] Perform block sorting on the original image so as to load the image blocks in the memory mapping window;

[0014] Create a target image with the same size as the target image, initialize it as a background image, and perform block sorting;

[0015] Obtain the shape and size of the transformed texture according to the image space transformation method, and combine the texture drawing starting point to obtain the texture area occupied by the transformed texture in the target image;

[0016] According to the image space transformation method, adopt the pixel point tracking technology, combine the texture drawing starting point, determine the position of the pixel point of the target image corresponding to the transformed texture, then determine the position in the original image, and obtain the pixel point information of the position according to the image block of the original image in the memory mapping window; thus draw the pixel points of the target image according to the pixel point information of the position.

[0017] Traverse each pixel point of each image block of the target image corresponding to the texture area until all the pixel points of all the image blocks of the target image corresponding to the texture area are drawn, and a complete target image is obtained.

[0018] Preferably, when traversing each pixel point of each image block of the target image corresponding to the texture area, obtain the coordinate positions of all pixel points in the area through the texture area, and traverse each pixel point according to the coordinate positions of all pixel points in the area to perform pixel point tracking.

[0019] Preferably, when traversing each pixel point of each image block of the target image corresponding to the texture area, it includes drawing in the way of traversing all pixel points of all image blocks of the target image; judge whether the pixel point is in the texture area; if not in the texture area, skip it; if in the texture area, perform pixel point tracking.

[0020] Preferably, the pixel point tracking technology is specifically:

[0021] Let the position of the current pixel point in the target image be P n ;

[0022] According to the texture drawing starting point, obtain the position P corresponding to the transformed texture c ;

[0023] According to the image space transformation method, use the inverse operation method to calculate P c The position P corresponding to the original image r .

[0024] Preferably, when calculating P c the position P corresponding in the original picture r if the picture block of the current memory mapping window is not the picture block where P is located r then switch the picture block of the current memory mapping window to the corresponding picture block; wherein, the memory mapping window is: using the memory mapping technology, dynamically allocating a limited space of a preset size for mapping and processing different picture blocks of the same size to load picture data in blocks and reduce memory occupancy.

[0025] Preferably, when drawing the pixel points of the target picture according to the pixel point information at the location, through the obtained picture color change method, perform positive processing on the color change of the pixel point information at the location to draw in the target picture.

[0026] Preferably, the starting point of the texture drawing is the starting point position for drawing corresponding to the starting point of the transformed texture in the target picture; the transformed texture of the preset transformation is in a rectangular mode, and the starting point of the transformed texture is set at one of the corners of the rectangle.

[0027] Preferably, when drawing the pixel points of the target picture, use the multi-thread processing technology to accelerate the drawing, including: adopting the parallel computing processing method, and each thread corresponds to an independent memory mapping window opened for the original picture; and based on the pixel points of the target picture, divide the work for each thread to avoid the situation where multiple threads process the same pixel point simultaneously.

[0028] Preferably, the rule for dividing the work for each thread based on the pixel points of the target picture is as follows:

[0029] Set the number of threads for concurrent processing to k;

[0030] Take the remainder of the sequential number of the pixel points of the target picture divided by k, and sequentially assign the pixel points to each thread according to the obtained remainder values to ensure independent operation of each thread.

[0031] Preferably, when used for multi-picture mixed output of multiple original pictures, adopt the pixel point tracking technology, and in combination with the starting point of the texture drawing, respectively determine the pixel points in multiple original pictures corresponding to the pixel points in the target picture;

[0032] According to the obtained multi-picture mixing requirements, mix the determined pixel points in multiple original pictures according to the multi-picture mixing requirements to obtain the pixel point information corresponding in the target picture, and perform drawing until all the pixel points in the target picture are traversed and drawn to obtain the target picture after multi-picture mixed output.

[0033] The present invention also provides a block mapping processing device for extra-large picture data, comprising:

[0034] An acquisition unit, configured to acquire an original picture of extra-large data and requirements of a target picture; wherein, the requirements of the target picture include: a picture space transformation method, a target picture size, and a starting point for texture mapping; the starting point for texture mapping is used to obtain the position correspondence between pixel points in the target picture and the transformed texture; the transformed texture is a process picture obtained by transforming the original picture according to the picture space transformation method;

[0035] A block mapping unit, configured to perform block sorting on the original picture so as to load picture blocks into a memory mapping window;

[0036] A target picture initialization unit, configured to create a target picture having the same size as the target picture, initialize it as a background picture, and perform block sorting;

[0037] A texture area acquisition unit, configured to acquire the shape and size of the transformed texture according to the picture space transformation method, and combine with the starting point for texture mapping to obtain the texture area occupied by the transformed texture in the target picture;

[0038] A pixel point tracking unit, configured to determine, according to the picture space transformation method, adopt a pixel point tracking technique, and combine with the starting point for texture mapping, the position of a pixel point in the target picture corresponding to the transformed texture, then determine the position in the original picture corresponding thereto, and acquire pixel point information at the position according to a picture block of the original picture in the memory mapping window; thereby performing drawing on the pixel points of the target picture according to the pixel point information at the position;

[0039] A drawing unit, configured to traverse each pixel point in the texture area corresponding to each picture block of the target picture until all pixel points in all picture blocks of the target picture corresponding to the texture area are drawn, so as to obtain a complete target picture.

[0040] Preferably, it further includes a multi-picture mixing unit, configured to perform multi-picture mixing output of multiple original pictures, specifically:

[0041] Adopt a pixel point tracking technique, and combine with the starting point for texture mapping, to respectively determine the pixel points in multiple original pictures corresponding to the pixel points in the target picture;

[0042] According to the obtained multi-picture mixing requirements, mix the determined pixel points in multiple original pictures according to the multi-picture mixing requirements, to obtain pixel point information corresponding to the target picture, and perform drawing until all pixel points in the target picture are traversed and drawn, so as to obtain a target picture after multi-picture mixing output.

[0043] The present invention also provides a device for block mapping processing of ultra-large image data, including a processor and a memory. A computer program is stored in the memory and can be executed by the processor to implement the method for block mapping processing of ultra-large image data as described above.

[0044] The present invention also provides a computer-readable storage medium, on which computer-readable instructions are stored. When the computer-readable instructions are executed by the processor of the device where the computer-readable storage medium is located, the method for block mapping processing of ultra-large image data as described above is implemented.

[0045] In summary, compared with the prior art, the present invention has the following beneficial effects:

[0046] By performing block mapping of ultra-large images in the memory mapping window, the present invention fully optimizes the use of memory and disk resources, reduces memory occupancy, and realizes stable, fast, and accurate processing of ultra-large images.

[0047] The present invention adopts a parallel computing and data transmission mechanism. Each thread can simultaneously process the memory mapping windows corresponding to multiple ultra-large images, and based on the pixel points of the target image, each thread is divided into different tasks for processing, realizing multi-threaded synchronous parallel processing and multi-image mixed output. At the same time, the present invention adopts a division of labor processing mechanism, avoiding the situation where multiple threads simultaneously process the same pixel point, effectively improving the processing efficiency and resource utilization rate, meeting the requirements of high efficiency and high quality in industrial printing, and reducing production costs at the same time. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and thus should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.

[0049] Figure 1 A schematic diagram of a method for block mapping processing of ultra-large image data provided for Embodiment 1.

[0050] Figure 2 A schematic diagram of the memory mapping window provided for Embodiment 1.

[0051] Figure 3 A schematic diagram of multi-image mixed processing provided for Embodiment 1.

[0052] Figure 4 A schematic diagram of a device for block mapping processing of ultra-large image data provided for Embodiment 2.

[0053] The present invention will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. Specific Embodiments

[0054] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are some, but not all, of the embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the present invention. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0055] Embodiment 1

[0056] Embodiment 1 of the present invention provides a method for block mapping processing of ultra-large image data, which can be implemented by an ultra-large image data block mapping processing device (hereinafter referred to as the block mapping processing device), and in particular, is executed by one or more processors in the block mapping processing device.

[0057] In this embodiment, the block mapping processing device may be an electronic device equipped with a processor, and the processor has a computer program for the method of block mapping processing of the ultra-large image data and the computer program can be executed, such as a computer, a smart phone, a smart tablet, a workstation, etc., which is not limited herein.

[0058] As Figure 1 shown, a method for block mapping processing of ultra-large image data includes steps S1 to S5.

[0059] S1. Obtain the original image of the ultra-large data and the requirements of the target image; wherein, the requirements of the target image include: the image space transformation method, the size of the target image, and the starting point of texture mapping; the starting point of texture mapping is used to obtain the position correspondence between the pixel points in the target image and the transformed texture; the transformed texture is a process image obtained by transforming the original image according to the image space transformation method.

[0060] In this embodiment, let the obtained original image be I r , the target image be I t , and the transformed texture be I c .

[0061] The format of the original image can be selected as TIFF format or other image formats for non-compressed data. In industrial printing, image formats that support non-compressed data are generally preferred. Selecting this type of image format can avoid quality loss caused by compression and ensure the integrity of image details; at the same time, this type of image format allows the application to directly read pixel data on demand without overall decoding, improving processing efficiency. In addition, this type of image format supports the CMYK color format, adapts to printing requirements, and accurately displays various color information.

[0062] The starting point of the texture mapping is the coordinate point in the target icon, which corresponds to the coordinate point on the transformed texture map, so as to obtain the position correspondence between the pixel points in the target image and the transformed texture map according to the starting point of the texture mapping. The transformed texture map is a process image that plays an auxiliary role and does not need to actually exist or be completely generated. In some application scenarios, the starting point of the texture mapping and the way of image space transformation are directly input by the designer. The designer can obtain the starting point of the texture mapping and the way of image space transformation through the following steps: scale down the original image and then perform space transformation operations and texture mapping operations to obtain a preview image. According to the finally determined preview image, obtain the coordinate of the starting point of the texture mapping and inversely deduce the simplest way of space transformation.

[0063] In this embodiment, the texture is not in the form of a complete existing image, but only used to record the data information during the transformation process of the image.

[0064] In this embodiment, the image space transformation methods include position transformation, cropping transformation, rotation transformation, mirror transformation, scaling transformation, etc.

[0065] Further, the starting point of the texture mapping is the starting point position for drawing corresponding to the starting point of the transformed texture map in the target image. In a preferred embodiment, the preset transformed texture map is in a rectangular mode, and the starting point of the transformed texture map is set at one of the corners of the rectangle, so that the position correspondence between the pixel points in the target image and the transformed texture map can be obtained more easily.

[0066] For the convenience of calculation, in this embodiment, the coordinate of the transformed texture map corresponding to the starting point of the texture mapping is the upper left corner of the transformed texture map, and it can also be set to other positions according to actual needs, which is not limited here.

[0067] S2. Perform block sorting on the original image so as to load the image blocks in the memory mapping window.

[0068] In this embodiment, the original image stored in the disk space is read and sorted in blocks according to a certain logic to load the image blocks in the memory mapping window. After block division, the serial number of the image block where the pixel point is located can be determined according to the position of the pixel point, and the image block with the specified serial number can be quickly switched in the memory mapping window.

[0069] As Figure 2 shown, the memory mapping window is a finite memory space of a preset size dynamically allocated through memory mapping technology, which is used to map and process different picture blocks of the same size to load picture data in blocks and reduce the occupation of memory space. For example, according to the order of the picture blocks, picture block 1, picture block 2,..., picture block n are mapped in sequence.

[0070] This method has the following advantages: (1) Avoiding memory shortage: By gradually loading pictures in blocks, the memory occupation requirement is reduced; (2) Efficient resource utilization: The use of memory and disk resources is fully optimized to achieve fast processing.

[0071] When the picture space transformation method includes a scaling transformation that reduces the original picture, one pixel point of the transformed texture map corresponds to multiple pixel points of the original picture. There is a probability that multiple pixel points in the original picture appear in different picture blocks respectively. At this time, according to the pixel point coordinates and the block size, it can be calculated which picture blocks they are distributed in, and then the picture blocks in the memory mapping window can be switched in sequence to extract the corresponding pixel point information. After the pixel point information is extracted, the pixel point information in the target picture can be obtained through existing scaling algorithms such as the nearest neighbor interpolation algorithm.

[0072] S3. Create a target picture with the same size as the target picture, initialize it as a background picture, and perform block sorting.

[0073] In this step, the background picture can be a blank picture, a picture with a background color, or a picture with other backgrounds. If it is a picture with a color, the color mixing relationship or the upper and lower layer position relationship between the background layer and the transformed texture map also needs to be obtained, which is not limited here.

[0074] S4. Obtain the shape and size of the transformed texture map according to the picture space transformation method, and combine the drawing starting point of the texture map to obtain the texture map area occupied by the transformed texture map in the target picture.

[0075] As an intermediate stage, the transformed texture map does not need to actually exist. It serves as an auxiliary line. Therefore, the transformed texture map itself does not need to be completely generated. Only with a small amount of calculation, the shape and size of the final outer contour of the transformed texture map obtained from the original picture according to the picture space transformation method can be obtained, so as to obtain the texture map area occupied by the transformed texture map in the target picture.

[0076] S5. According to the above-mentioned picture space transformation method, adopt the pixel point tracking technology, combine with the starting point of the texture mapping drawing, determine the position of the pixel points of the target picture corresponding to the transformed texture map, and then determine the position in the original picture corresponding thereto, and obtain the pixel point information of the position according to the picture block of the original picture in the memory mapping window; thus, draw the pixel points of the target picture according to the pixel point information of the position.

[0077] The specific pixel point tracking technology is as follows:

[0078] Let the position of the current pixel point in the target picture be P n ;

[0079] According to the starting point of the texture mapping drawing, obtain the position P corresponding to the transformed texture map c ;

[0080] According to the above-mentioned picture space transformation method, adopt the inverse operation method to calculate P c The position P corresponding to the original picture r .

[0081] When calculating the position P c Corresponding to the original picture, if the picture block of the current memory mapping window is not the picture block where the position P r is located, then switch the picture block of the current memory mapping window to the correct picture block, and retrieve the pixel point information of the position P r . r

[0082] S6. Traverse each pixel point in the texture map area corresponding to each picture block of the target picture until all the pixel points in the texture map area corresponding to all the picture blocks of the target picture are drawn, and a complete target picture is obtained.

[0083] In a preferred embodiment, when traversing each pixel point in the texture map area corresponding to each picture block of the target picture, obtain the coordinate positions of all the pixel points in the area through the texture map area, and traverse each pixel point starting from the texture mapping drawing starting point according to the coordinate positions of all the pixel points in the area to perform pixel point tracking. By adopting this method, the calculation amount of the algorithm can be effectively reduced, the memory occupation can be reduced, and thus the operation efficiency of the system can be improved.

[0084] In other preferred embodiments, when traversing each pixel point corresponding to each picture block of the target picture within the mapping area, it includes drawing in a way of traversing all pixel points of all picture blocks of the target picture; by determining whether the pixel point is within the mapping area; if not within the mapping area, skip it; if within the mapping area, perform pixel point tracking. By adopting this method, omission of pixel points can be effectively avoided, thereby improving the accuracy of drawing the target picture.

[0085] In a preferred embodiment, when drawing the pixel points of the target picture based on the pixel point information at the location, through the obtained picture color change mode, positive processing of color change is performed on the pixel point information at the location for drawing in the target picture.

[0086] For example, when the picture transformation mode is color transformation, then based on the pixel point information of the retrieved position P r perform color change (positive operation) to obtain the transformed pixel point information, and then perform subsequent transformation or drawing processing. The target picture is gradually drawn from a background picture into a complete target picture.

[0087] In addition, in another preferred embodiment, the method of the present invention can also be used for multi-picture mixed output of multiple original pictures. When multiple pictures need to be processed simultaneously, each original picture is saved separately on the disk, and a memory mapping window is set up in the memory respectively. At this time, the size of each memory mapping window is determined according to the size of each picture and the available idle space in the memory, and then the pictures are divided into blocks according to the determined size of the memory mapping window.

[0088] For example, assume there are two original pictures, namely I ra and I rb . After being divided into blocks according to the size of the allocated memory mapping window, each picture block is I ra1 and I ra2 ...; I rb1 and I rb2 ...

[0089] Then, further, by adopting the pixel point tracking technology, combined with the starting point of the mapping drawing, the pixel points corresponding to the pixel points in the target picture in multiple original pictures are respectively determined.

[0090] According to the obtained multi-picture mixing requirements, the pixel points in the determined multiple original pictures are positively operated according to the multi-picture mixing requirements, and then mixed to obtain the pixel point information corresponding to the target picture, and drawing is performed until all pixel points in the target picture are traversed and drawn, and the target picture after multi-picture mixed output is obtained.

[0091] For example, the preset multi-image mixing requirements are a stacking relationship, or a transparency ratio relationship, or a logical relationship set according to the value size of pixel points, etc. Pixel point information corresponding to multiple original images is obtained respectively through pixel point tracking technology; then, according to the preset multi-image mixing requirements, pixel points of the texture maps after transformation processing from different original images are mixed to obtain the pixel point information in the final target image, and the image block where the target image pixel points are located is found and drawn through a memory mapping window.

[0092] The target image is stored in disk space and has a corresponding mapping window in memory. The mapping window processes multiple image blocks in chunks, and finally the drawn image blocks are aggregated in disk space to form a complete target image.

[0093] During the image drawing process, we perform mapping allocation of memory blocks for the target image and the obtained original image data (i.e., the original image). All operations and calculations during image transformation and pixel processing are performed on a single pixel, that is, each pixel performs a series of calculations separately to reduce the memory space occupancy requirements.

[0094] As Figure 3 shown, taking the scenario of mixing two original images and processing one pixel point as an example. The texture maps corresponding to the two original images are transformation texture Figure 1 and transformation texture Figure 2 .

[0095] Suppose the pixel to be drawn in this round is pixel P, and the position coordinates of P on the output image (i.e., the target image) are A. After calculation, it can be obtained that the position of point A corresponding to the texture Figure 1 after a series of transformations is B; at the same time, the position on the transformation texture Figure 2 after a series of transformations is C. Through reverse calculation, it can be obtained that the position on the original image 1 corresponding to position B is G, and thus the pixel O of the original image 1 is obtained. Similarly, the position I on the original image 2 corresponding to position C and the pixel Q can be obtained. After obtaining the pixel points on the original images, if the transformation operation of the original image 1 includes color calculation, the corresponding color calculation is performed on pixel O in turn, and finally the pixel values of the two pixel points O and Q at positions B and C are obtained respectively, and then the pixel value of pixel P is obtained by mixing using an algorithm and drawn at position A on the target image.

[0096] Therefore, A on the target image is obtained by mixing B and C, and B is obtained from pixel O of the original image through GFED; C is obtained from pixel Q of the original image through I H.

[0097] Each pixel of each image block will go through such repeated calculations, and finally the values of all pixel points on the target image are obtained.

[0098] In another preferred embodiment, since each pixel is independently operated without interference, parallel computing technologies (such as multi-threading, OPENMP, etc.) can be used for concurrent processing. However, since the allocation of memory resources and disk resources is shared in a single copy, concurrent access to these resources requires synchronization operations, which will greatly reduce efficiency. Therefore, to avoid this situation, this embodiment takes multi-threading processing as an example for optimization.

[0099] When drawing the pixels of the target picture, multi-threading processing technology is used to accelerate the drawing, including: adopting a parallel computing processing method, where each thread corresponds to an independent memory mapping window opened for the original picture, that is, each thread can simultaneously process the memory mapping windows corresponding to multiple original pictures respectively, and based on the pixels, each thread is divided into tasks to avoid the situation where multiple threads process the same pixel simultaneously.

[0100] During multi-threaded concurrent processing, since the pixel positions on the original picture obtained by inverse deduction of the pixels in the target picture block responsible for each thread may belong to two different picture blocks, it is necessary to switch the picture blocks in the memory mapping window. And there is only 1 memory mapping window corresponding to each original picture, so thread synchronization is required, and frequent switching of the mapped picture blocks will result in low efficiency.

[0101] To solve this problem, the present invention copies the obtained original pictures into multiple copies before drawing, so that each picture can set multiple memory mapping windows according to the number of threads, and each concurrent thread independently associates with one memory mapping window of each original picture, so that each thread can operate independently without synchronization between threads.

[0102] For example, there are two original pictures I ra 、I rb , and each picture block is I ra1 、I ra2 ...; I rb1 、I rb2 ...,

[0103] Thread 1 has a memory mapping window of 1 original picture I ra (the picture blocks I ra1 , picture block I ra2 , picture block I ra3 ... can be switched within this window), and a memory mapping window of 1 original picture I rb (the picture blocks I rb1 , picture block I rb2 , picture block I rb3 ... can be switched within this window);

[0104] Thread 2 has a memory mapping window of 1 original picture Ira 's memory mapping window (within this window, mapped picture blocks I ra1 , picture block I ra2 , picture block I ra3 ...) and one original picture I rb 's memory mapping window (within this window, picture blocks I rb1 , picture block I rb2 , picture block I rb3 ...).

[0105] To maintain the order among threads and avoid the situation where multiple threads process the same pixel point simultaneously, it is necessary to set up a division of labor processing rule based on the pixel points of the target picture.

[0106] Furthermore, the rule for dividing the work of each thread based on the pixel points of the target picture is as follows:

[0107] Set the number of concurrently processed threads to k;

[0108] Take the remainder of the sequential numbering of the pixel points of the target picture divided by k, and sequentially assign the pixel points of the target picture to each thread according to the obtained remainder values to ensure independent operations of each thread.

[0109] For example, assuming there are four concurrent threads, then:

[0110] The first thread processes the pixels at the 1st, 5th, 9th, 13th... positions of the target picture;

[0111] The second thread processes the pixels at the 2nd, 6th, 10th, 14th... positions of the target picture;

[0112] The third thread processes the pixels at the 3rd, 7th, 11th, 15th... positions of the target picture;

[0113] The fourth thread processes the pixels at the 4th, 8th, 12th, 16th... positions of the target picture;

[0114] And so on, the i-th pixel is processed by the thread with the thread number mod(i, 4), and when mod(i, 4) = 0, it is the fourth thread; where mod is the remainder function.

[0115] This method can ensure independent operations among threads without additional synchronization and can significantly improve the computational processing efficiency.

[0116] In some preferred embodiments, in order to further improve the processing efficiency, the method of the present invention determines the effective drawing area by recording the mapped area of each original picture in the target picture after transformation. When traversing the pixel points of the picture blocks of the target picture, if the pixel is not within the mapped area, the invalid points are skipped and the next valid pixel is directly processed. This method can avoid invalid operations and reduce resource waste.

[0117] In summary, compared with the prior art, the present invention has the following beneficial effects:

[0118] The present invention maps the ultra-large picture in the memory mapping window by block, fully optimizing the use of memory and disk resources, reducing memory occupancy, and realizing stable, fast, and accurate processing of the ultra-large picture.

[0119] The present invention adopts a parallel computing and data transmission mechanism. Each thread can simultaneously process the memory mapping windows corresponding to multiple ultra-large pictures, and based on the pixel points of the target picture, each thread is divided into tasks for processing, realizing multi-threaded synchronous parallel processing and multi-picture mixed output. At the same time, the present invention adopts a division of labor processing mechanism, avoiding the situation where multiple threads process the same pixel point simultaneously, effectively improving the processing efficiency and resource utilization rate, meeting the requirements of high efficiency and high quality in industrial printing, and reducing production costs at the same time.

[0120] Embodiment 2

[0121] As Figure 4 shown, the second embodiment of the present invention further provides a block mapping processing device for ultra-large picture data, including:

[0122] An acquisition unit, configured to acquire the original picture of the ultra-large data and the requirements of the target picture; wherein, the requirements of the target picture include: the picture space transformation method, the size of the target picture, and the mapping drawing starting point; the mapping drawing starting point is used to obtain the position correspondence between the pixel points in the target picture and the transformed mapping; the transformed mapping is the process picture obtained by transforming the original picture according to the picture space transformation method;

[0123] A block mapping unit, configured to perform block sorting on the original picture so as to load the picture blocks in the memory mapping window;

[0124] A target picture initialization unit, configured to establish a target picture with the same size as the target picture, initialize it as a background picture, and perform block sorting;

[0125] A mapped area acquisition unit, configured to obtain the shape and size of the transformed mapping according to the picture space transformation method, and combine the mapping drawing starting point to obtain the mapped area occupied by the transformed mapping in the target picture;

[0126] The pixel tracking unit is used to determine the position of the pixel of the target image corresponding to the transformed map according to the image space transformation method, using the pixel tracking technology and combining the starting point of the map drawing, and then determine the position in the original image, and obtain the pixel information of the position according to the image block of the original image in the memory mapping window; thus, draw the pixel of the target image according to the pixel information of the position.

[0127] The drawing unit is used to traverse each pixel corresponding to each image block of the target image in the map area until all the pixels corresponding to the image blocks of the target image in the map area are drawn, and a complete target image is obtained.

[0128] It further includes a multi-image mixing unit for multi-image mixing output of multiple original images, specifically:

[0129] Using the pixel tracking technology and combining the starting point of the map drawing, respectively determine the pixels in multiple original images corresponding to the pixels in the target image;

[0130] According to the obtained multi-image mixing requirements, mix the determined pixels in multiple original images according to the multi-image mixing requirements to obtain the pixel information corresponding to the target image, and perform drawing until all the pixels in the target image are traversed and drawn, and a target image after multi-image mixing output is obtained.

[0131] Embodiment III

[0132] The third embodiment of the present invention further provides a device for block mapping processing of ultra-large image data, which includes a memory and a processor. A computer program is stored in the memory, and the computer program can be executed by the processor to implement the method for block mapping processing of ultra-large image data as described above.

[0133] Embodiment IV

[0134] The fourth embodiment of the present invention further provides a computer-readable storage medium. Computer-readable instructions are stored on the computer-readable storage medium. When the computer-readable instructions are executed by the processor of the device where the computer-readable storage medium is located, the method for block mapping processing of ultra-large image data as described above is implemented.

[0135] In several embodiments provided by the embodiments of the present invention, it should be understood that the disclosed devices and methods can also be implemented in other ways. The device and method embodiments described above are merely illustrative. For example, the flowcharts in the accompanying drawings show the possible architectures, functions, and operations of devices, methods, and computer program products according to multiple embodiments of the present invention. In this regard, each block in the flowchart or block diagram may represent a module, a program segment, or a part of code, and the part of the module, program segment, or code contains one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than that marked in the accompanying drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in the reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, as well as the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.

[0136] In addition, each functional module in various embodiments of the present invention may be integrated together to form an independent part, or each module may exist alone, or two or more modules may be integrated to form an independent part.

[0137] If the above functions are implemented in the form of software functional modules and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of this technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, an electronic device, or a network device, etc.) to execute all or part of the steps of the methods described in various embodiments of the present invention. The aforementioned storage medium includes: various media such as USB flash drives, mobile hard disks, read-only memories (ROMs), random access memories (RAMs), magnetic disks, or optical discs that can store program codes. It should be noted that in this article, the term "including", "comprising", or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article, or device including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such a process, method, article, or device. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article, or device including the said element.

[0138] The terms used in the embodiments of the present invention are for the purpose of describing specific embodiments only and are not intended to limit the present invention. The singular forms "a", "the", and "said" used in the embodiments of the present invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0139] It should be understood that the term "and / or" used herein is merely a description of the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B may represent: A exists alone, A and B exist simultaneously, and B exists alone. In addition, the character " / " herein generally represents an "or" relationship between the associated objects before and after.

[0140] Depending on the context, the word "if" as used herein may be interpreted as "when" or "while" or "in response to determining" or "in response to detecting". Similarly, depending on the context, the phrase "if determined" or "if detected (stated condition or event)" may be interpreted as "when determined" or "in response to determining" or "when detected (stated condition or event)" or "in response to detecting (stated condition or event)".

[0141] The "first / second" mentioned in the embodiments is only to distinguish similar objects and does not represent a specific order for the objects. It can be understood that the "first / second" can be interchanged in the allowed cases for the specific order or sequence. It should be understood that the objects distinguished by the "first / second" can be interchanged appropriately so that the embodiments described herein can be implemented in an order other than those illustrated or described herein.

[0142] The above are only the preferred embodiments of the present invention and are not used to limit the present invention. For those skilled in the art, various changes and modifications can be made to the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A block mapping processing method for super large image data, characterized in that: include: Obtaining the original image of the super data and the target image requirements; wherein the target image requirements include: image space transformation mode, target image size and texture drawing starting point; the texture drawing starting point is used to obtain the position correspondence between the pixel points in the target image and the transformation texture; the transformation texture is the process image after the original image is transformed according to the image space transformation mode; Sorting the original image into blocks so as to load the image blocks into a memory mapping window; Create a target image with the same size as the target image, initialize it as the background image, and sort it into blocks; Obtaining the shape and size of the transformation map according to the image space transformation method, and obtaining the map area occupied by the transformation map in the target image in combination with the map drawing starting point; According to the image space transformation method, a pixel tracking technology is used, combined with the map drawing starting point, to determine the position of the pixel of the target image corresponding to the transformed map, and then determine the corresponding position in the original image, and obtain the pixel information of the position according to the image block of the original image in the memory mapping window; thereby drawing the pixel of the target image according to the pixel information of the position; Traverse each pixel point in the mapping area corresponding to each picture block of the target picture until all the pixel points in the mapping area corresponding to all the picture blocks of the target picture are drawn to obtain a complete target picture.

2. The method for processing large image data by block mapping according to claim 1, characterized in that When traversing each pixel point corresponding to each picture block of the target picture in the mapping area, the coordinate positions of all the pixel points in the area are obtained through the mapping area, and each pixel point is traversed according to the coordinate positions of all the pixel points in the area to perform pixel tracking.

3. The block mapping processing method for super large image data according to claim 1 is characterized in that , when traversing each pixel point corresponding to each picture block of the target picture in the mapping area, including drawing in a manner of traversing all pixel points of all picture blocks of the target picture; By judging whether the pixel point is within the mapping area; if not, skipping; if within the mapping area, performing pixel tracking.

4. The block mapping processing method for super large image data according to claim 1 is characterized in that ,The pixel tracking technology is specifically: Assume the position of the current pixel in the target image is P n ; According to the starting point of the map drawing, the corresponding position P in the transformed map is obtained. c ; According to the image space transformation method, the inverse operation method is used to calculate P c Corresponding to the position P in the original picture r .

5. The block mapping processing method for super large image data according to claim 4 is characterized in that , in calculating P c Corresponding to the position P in the original picture r When the image block of the current memory mapping window is not at position P r The picture block where the image is located is switched to the corresponding picture block in the current memory mapping window; wherein the memory mapping window is: using memory mapping technology to dynamically allocate a limited space of a preset size for mapping and processing different picture blocks of the same size, so as to load picture data in blocks and reduce memory usage.

6. The block mapping processing method for super large image data according to claim 1 is characterized in that ,When drawing the pixel points of the target image according to the pixel point information at the location, the color change of the pixel point information at the location is forwardly processed by the acquired color change method of the image, so as to be drawn in the target image.

7. The block mapping processing method for super large image data according to claim 1 is characterized in that The starting point of the map drawing is the starting point position of the target image corresponding to the starting point of the transformation map; the transformation map of the preset transformation is a rectangular mode, and the starting point of the transformation map is set at one of the corners of the rectangle.

8. The block mapping processing method for super large image data according to claim 1 is characterized in that ,When drawing the pixels of the target image, multi-threaded processing technology is used to accelerate the drawing, including: A parallel computing processing method is adopted, and each thread corresponds to an independent memory mapping window opened for the original image; and each thread is divided into different tasks based on the pixel points of the target image to avoid the situation where multiple threads process the same pixel point at the same time.

9. The block mapping processing method for super large image data according to claim 8 is characterized in that ,The rules for dividing the work of each thread based on the pixels of the target image are as follows: Set the number of concurrent processing threads to k; The sequential numbers of the pixels of the target image are modulo k, and the pixels of the target image are sequentially allocated to each thread in order according to the modulo value obtained, so as to ensure that each thread operates independently.

10. A block mapping processing method for super large image data according to any one of claims 1 to 9, characterized in that ,When used for multi-image mixed output of multiple original images, the pixel tracking technology is adopted ,combined with the starting point of the texture drawing, to respectively determine the pixel points in the target image corresponding to the pixel points in the multiple original images; According to the obtained multi-image mixing requirements, the pixels in the determined multiple original images are mixed according to the multi-image mixing requirements to obtain the pixel point information corresponding to the target image, and the pixels are drawn until all the pixels in the target image are traversed and drawn to obtain the target image after the multi-image mixing output.

11. A block mapping processing device for super large image data, characterized in that: include: An acquisition unit is used to acquire an original image of super-large data and target image requirements; wherein the target image requirements include: image space transformation mode, target image size and texture drawing starting point; the texture drawing starting point is used to obtain the position correspondence between the pixel points in the target image and the transformation texture; the transformation texture is a process image after the original image is transformed according to the image space transformation mode; A block mapping unit, used for sorting the original image into blocks, so as to load the image blocks into a memory mapping window; A target picture initialization unit is used to create a target picture with the same size as the target picture, initialize it as a background picture, and perform block sorting; A map area acquisition unit, used to acquire the shape and size of the transformed map according to the image space transformation method, and acquire the map area occupied by the transformed map in the target image in combination with the map drawing starting point; A pixel tracking unit is used to determine the position of the pixel of the target image in the transformed map according to the image space transformation mode and the pixel tracking technology in combination with the map drawing starting point, and then determine the corresponding position in the original image, and obtain the pixel information of the position according to the image block of the original image in the memory mapping window; thereby drawing the pixel of the target image according to the pixel information of the position; The drawing unit is used to traverse each pixel point in the mapping area corresponding to each picture block of the target picture until all the pixel points in the mapping area corresponding to all the picture blocks of the target picture are drawn to obtain a complete target picture.

12. The block mapping processing device for super large image data according to claim 11, characterized in that: It also includes a multi-image mixing unit for multi-image mixing output of multiple original images, specifically: Using pixel tracking technology, combined with the texture drawing starting point, respectively determine the pixel points in the target image corresponding to the pixel points in multiple original images; According to the obtained multi-image mixing requirements, the pixels in the determined multiple original images are mixed according to the multi-image mixing requirements to obtain the pixel point information corresponding to the target image, and the pixels are drawn until all the pixels in the target image are traversed and drawn to obtain the target image after the multi-image mixing output.

13. A block mapping processing device for super large image data, characterized in that: It includes a processor and a memory, wherein the memory stores a computer program, and the computer program can be executed by the processor to implement a block mapping processing method for super-large image data as described in any one of claims 1-9.

14. A computer-readable storage medium, on which computer-readable instructions are stored, and the computer-readable instructions are executed by a processor of a device where the computer-readable storage medium is located to implement a block mapping processing method for ultra-large image data as described in any one of claims 1-9.