CN112884849A - Panoramic image splicing and color matching method and device - Google Patents
Panoramic image splicing and color matching method and device Download PDFInfo
- Publication number
- CN112884849A CN112884849A CN202110150088.5A CN202110150088A CN112884849A CN 112884849 A CN112884849 A CN 112884849A CN 202110150088 A CN202110150088 A CN 202110150088A CN 112884849 A CN112884849 A CN 112884849A
- Authority
- CN
- China
- Prior art keywords
- image
- wide
- downsampled
- angle
- color
- 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 46
- 238000005070 sampling Methods 0.000 claims abstract description 37
- 238000006243 chemical reaction Methods 0.000 claims description 21
- 238000012545 processing Methods 0.000 claims description 12
- 238000004364 calculation method Methods 0.000 description 15
- 238000004422 calculation algorithm Methods 0.000 description 14
- 230000008859 change Effects 0.000 description 6
- 238000010586 diagram Methods 0.000 description 5
- 230000006870 function Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000004590 computer program Methods 0.000 description 3
- 239000003086 colorant Substances 0.000 description 2
- 238000001514 detection method Methods 0.000 description 2
- 238000005516 engineering process Methods 0.000 description 2
- 239000011159 matrix material Substances 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000011160 research Methods 0.000 description 2
- 239000007787 solid Substances 0.000 description 2
- 241001025261 Neoraja caerulea Species 0.000 description 1
- 238000003491 array Methods 0.000 description 1
- 230000000712 assembly Effects 0.000 description 1
- 238000000429 assembly Methods 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000013461 design Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000014509 gene expression Effects 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
- 230000005055 memory storage Effects 0.000 description 1
- 238000010295 mobile communication Methods 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000000007 visual effect Effects 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/90—Determination of colour characteristics
-
- 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
- G06T3/4023—Scaling of whole images or parts thereof, e.g. expanding or contracting based on decimating pixels or lines of pixels; based on inserting pixels or lines of pixels
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The embodiment discloses a method and a device for splicing and toning panoramic images, and relates to the field of computer vision. The method comprises the following steps: acquiring a non-wide-angle image, and extracting a color-mixing reference image block on a wide-angle image corresponding to the non-wide-angle image; performing a downsampling operation on the non-wide-angle image to generate a downsampled image; toning the down-sampling image in an LAB color domain by referring to the toning reference image block to generate a down-sampling toning image; generating a downsampled image gain array according to the pixel value of the downsampled image and the pixel value of the downsampled color-mixing image; performing an upsampling operation on the downsampled image gain array to generate a non-wide-angle image gain array; and completing color matching on the non-wide-angle image according to the non-wide-angle image gain array.
Description
Technical Field
The disclosure relates to the field of computer vision, in particular to a method and a device for splicing and toning panoramic images.
Background
Image stitching has been the subject of intense research in the field of computer vision. By image stitching, it is meant a technique of stitching two (or more) images of the same scene (which may be at different times, at different viewing angles, or at different sensors) having overlapping portions into one image with wide viewing angle and high resolution. As is well known, the viewing angle range of the existing camera devices is limited, and individual images acquired by the camera devices have to be stitched to obtain a panoramic image with a large viewing angle range, which is required by people. At present, many image stitching algorithms can extract overlapped parts in the same scene image and quickly stitch the overlapped parts into a panoramic image. Such as multi-scale image stitching algorithms using wavelets and gradient domain image stitching algorithms.
However, the traditional image mosaic algorithm only carries out color matching based on the color difference and the brightness difference of the overlapped area of the mosaic image, and when the brightness difference of the original image to be mosaic is large, the mosaic image obtained by the traditional image mosaic algorithm cannot completely eliminate the brightness and the color difference, so that the mosaic panoramic image presents unnatural overall color; in addition, the conventional LAB toning related content does not consider the calculation amount of conversion from an RGB color gamut to an LAB color gamut and from the LAB color gamut to the RGB color gamut of a complete image, because the two color gamut conversion relations are not linear conversion between RGB and YUV, but involve the pixel-level index change of RGB (fixed Gamma change and index change from an XYZ color gamut to an LAB color gamut), involve the calculation of a large number of pixels, and cause heavy calculation task and slow calculation, thereby affecting the toning efficiency and the fluency of real-time video.
Disclosure of Invention
Aiming at the technical problems in the prior art, the embodiment of the disclosure provides a method and a device for splicing and toning a panoramic image, which can solve the problems that a spliced image in the prior art cannot eliminate color difference, splicing is not natural, a calculation task is heavy, and the like.
A first aspect of the embodiments of the present disclosure provides a method for stitching and toning a panoramic image, including:
acquiring a non-wide-angle image, and extracting a color-mixing reference image block on a wide-angle image corresponding to the non-wide-angle image;
performing a downsampling operation on the non-wide-angle image to generate a downsampled image;
toning the down-sampling image in an LAB color domain by referring to the toning reference image block to generate a down-sampling toning image;
generating a downsampled image gain array according to the pixel value of the downsampled image and the pixel value of the downsampled color-mixing image;
performing an upsampling operation on the downsampled image gain array to generate a non-wide-angle image gain array;
and completing color matching on the non-wide-angle image according to the non-wide-angle image gain array.
In some embodiments, the method specifically comprises:
acquiring a corresponding coordinate range of the non-wide-angle image in a coordinate system of the wide-angle image;
and intercepting a color matching reference block matched with the non-wide-angle image on the wide-angle image according to the corresponding coordinate range.
In some embodiments, the method specifically comprises: performing an LAB gamut conversion operation on the toned reference image block and the downsampled image, and toning the downsampled image in the LAB gamut.
In some embodiments, the method further comprises: an RGB gamut conversion operation is performed on the downsampled toned image.
In some embodiments, the method further comprises: presetting a gain parameter;
and the gain parameters participate in operation processing together with the pixel values of the downsampled image and the pixel values of the downsampled color-mixing image to generate a downsampled image gain array.
In some embodiments, the method specifically comprises:
summing the gain parameter with the pixel value of the down-sampling color-mixing image to obtain a result as a molecule;
summing the gain parameter and the pixel value of the down-sampling image, and taking the obtained result as a denominator;
and dividing the numerator and the denominator to obtain a downsampling image gain array.
In some embodiments, the toning the non-wide-angle image according to the non-wide-angle image gain array specifically includes:
and performing operation processing on all pixels in the non-wide-angle image according to the non-wide-angle image gain array and the gain parameters to finish color matching.
In some embodiments, the method further comprises: and acquiring the characteristic points on the non-wide-angle image and the wide-angle image to complete the matching of the characteristic points.
A second aspect of the embodiments of the present disclosure provides an apparatus for stitching and color mixing of panoramic images, the apparatus including:
the image reference block determining module is used for acquiring a non-wide-angle image and extracting a color-mixing reference image block on a wide-angle image corresponding to the non-wide-angle image;
a down-sampling image generation module for performing down-sampling operation on the non-wide-angle image to generate a down-sampling image;
the down-sampling image toning module is used for toning the down-sampling image in an LAB color gamut by referring to the toning reference image block to generate a down-sampling toning image;
determining a downsampling image gain array module, which is used for generating a downsampling image gain array according to the pixel value of the downsampling image and the pixel value of the downsampling color-mixing image;
a non-wide-angle image gain array determining module, configured to perform an upsampling operation on the downsampled image gain array to generate a non-wide-angle image gain array;
and the non-wide-angle image toning module is used for toning the non-wide-angle image according to the non-wide-angle image gain array.
In some embodiments, the determine image reference block module is specifically configured to: acquiring a corresponding coordinate range of the non-wide-angle image in a coordinate system of the wide-angle image;
and intercepting a color matching reference block matched with the non-wide-angle image on the wide-angle image according to the corresponding coordinate range.
In some embodiments, the downsampled image toning module is specifically configured to: performing an LAB gamut conversion operation on the toned reference image block and the downsampled image, and toning the downsampled image in the LAB gamut.
In some embodiments, the downsampled image toning module is further to perform an RGB color gamut conversion operation on the downsampled toned image.
In some embodiments, the determining a downsampled image gain array module is further specifically configured to: presetting a gain parameter; and the gain parameters participate in operation processing together with the pixel values of the downsampled image and the pixel values of the downsampled color-mixing image to generate a downsampled image gain array.
In some embodiments, the determining a downsampled image gain array module is specifically configured to: summing the gain parameter with the pixel value of the down-sampling color-mixing image to obtain a result as a molecule; summing the gain parameter and the pixel value of the down-sampling image, and taking the obtained result as a denominator; and dividing the numerator and the denominator to obtain a downsampling image gain array.
A third aspect of the embodiments of the present disclosure provides an electronic device, including:
a memory and one or more processors;
wherein the memory is communicatively coupled to the one or more processors, and the memory stores instructions executable by the one or more processors, and when the instructions are executed by the one or more processors, the electronic device is configured to implement the method according to the foregoing embodiments.
A fourth aspect of the embodiments of the present disclosure provides a computer-readable storage medium having stored thereon computer-executable instructions, which, when executed by a computing device, may be used to implement the method according to the foregoing embodiments.
A fifth aspect of embodiments of the present disclosure provides a computer program product comprising a computer program stored on a computer readable storage medium, the computer program comprising program instructions which, when executed by a computer, are operable to implement a method as in the preceding embodiments.
The beneficial effects of the embodiment of the disclosure are: by the panoramic image splicing and color mixing method and device, the color mixing reference block is obtained from the wide-angle image corresponding to the non-wide-angle image and is used as the reference for color mixing of the non-wide-angle image, the color is excessive and more natural, and the splicing quality is greatly improved; meanwhile, the method performs downsampling operation on the non-wide-angle image, performs color gamut conversion with large calculation amount only on the downsampling size, and only involves simple addition, subtraction and multiplication operation on the color matching of the whole non-wide-angle image, so that the calculation amount is greatly reduced, the running speed is improved, and the color matching efficiency is further improved.
Drawings
The features and advantages of the present disclosure will be more clearly understood by reference to the accompanying drawings, which are illustrative and not to be construed as limiting the disclosure in any way, and in which:
FIG. 1 is a flow diagram of a method for stitching and toning a panoramic image according to some embodiments of the present disclosure;
FIG. 2 is a block diagram of an apparatus for stitching and toning a panoramic image according to some embodiments of the present disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to some embodiments of the present disclosure.
Detailed Description
In the following detailed description, numerous specific details of the disclosure are set forth by way of examples in order to provide a thorough understanding of the relevant disclosure. However, it will be apparent to one of ordinary skill in the art that the present disclosure may be practiced without these specific details. It should be understood that the use of the terms "system," "apparatus," "unit" and/or "module" in this disclosure is a method for distinguishing between different components, elements, portions or assemblies at different levels of sequence. However, these terms may be replaced by other expressions if they can achieve the same purpose.
It will be understood that when a device, unit or module is referred to as being "on" … … "," connected to "or" coupled to "another device, unit or module, it can be directly on, connected or coupled to or in communication with the other device, unit or module, or intervening devices, units or modules may be present, unless the context clearly dictates otherwise. For example, as used in this disclosure, the term "and/or" includes any and all combinations of one or more of the associated listed items.
The terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to limit the scope of the present disclosure. As used in the specification and claims of this disclosure, the terms "a," "an," "the," and/or "the" are not intended to be inclusive in the singular, but rather are inclusive in the plural, unless the context clearly dictates otherwise. In general, the terms "comprises" and "comprising" are intended to cover only the explicitly identified features, integers, steps, operations, elements, and/or components, but not to constitute an exclusive list of such features, integers, steps, operations, elements, and/or components.
These and other features and characteristics of the present disclosure, as well as the methods of operation and functions of the related elements of structure and the combination of parts and economies of manufacture, will be better understood by reference to the following description and drawings, which form a part of this specification. It is to be expressly understood, however, that the drawings are for the purpose of illustration and description only and are not intended as a definition of the limits of the disclosure. It will be understood that the figures are not drawn to scale.
Various block diagrams are used in this disclosure to illustrate various variations of embodiments according to the disclosure. It should be understood that the foregoing and following structures are not intended to limit the present disclosure. The protection scope of the present disclosure is subject to the claims.
Image stitching has been the subject of intense research in the field of computer vision. By image stitching, it is meant a technique of stitching two (or more) images of the same scene (which may be at different times, at different viewing angles, or at different sensors) having overlapping portions into one image with wide viewing angle and high resolution. As is well known, the viewing angle range of the existing camera devices is limited, and individual images acquired by the camera devices have to be stitched to obtain a panoramic image with a large viewing angle range, which is required by people. At present, many image stitching algorithms can extract overlapped parts in the same scene image and quickly stitch the overlapped parts into a panoramic image. Such as multi-scale image stitching algorithms using wavelets and gradient domain image stitching algorithms.
However, the traditional image mosaic algorithm only carries out color matching based on the color difference and the brightness difference of the overlapped area of the mosaic image, and when the brightness difference of the original image to be mosaic is large, the mosaic image obtained by the traditional image mosaic algorithm cannot completely eliminate the brightness and the color difference, so that the mosaic panoramic image presents unnatural overall color; in addition, the conventional LAB toning related content does not consider the calculation amount of conversion from an RGB color gamut to an LAB color gamut and from the LAB color gamut to the RGB color gamut of a complete image, because the two color gamut conversion relations are not linear conversion between RGB and YUV, but involve the pixel-level index change of RGB (fixed Gamma change and index change from an XYZ color gamut to an LAB color gamut), involve the calculation of a large number of pixels, and cause heavy calculation task and slow calculation, thereby affecting the toning efficiency and the fluency of real-time video.
In order to solve the above problem, this embodiment discloses a method for splicing and toning a panoramic image, as shown in fig. 1, specifically including:
s101, acquiring a non-wide-angle image, and extracting a color-mixing reference image block on a wide-angle image corresponding to the non-wide-angle image;
s102, performing downsampling operation on the non-wide-angle image to generate a downsampled image;
s103, toning the down-sampling image in an LAB color gamut by referring to the toning reference image block to generate a down-sampling toning image;
s104, generating a downsampled image gain array according to the pixel value of the downsampled image and the pixel value of the downsampled color-mixing image;
s105, performing up-sampling operation on the down-sampling image gain array to generate a non-wide-angle image gain array;
and S106, completing color matching on the non-wide-angle image according to the non-wide-angle image gain array.
In some embodiments, the method further comprises:
and realizing the characteristic point matching of the non-wide-angle image and the wide-angle image.
Further, the feature point matching specifically includes:
1. acquiring non-wide-angle images shot by all non-wide-angle cameras and wide-angle images shot by wide-angle cameras covering the visual fields of all non-wide-angle cameras;
2. obtaining characteristic points of the non-wide-angle image and characteristic points of the wide-angle image by using a characteristic point detection mode; preferably, the feature point detection method is a Scale-invariant feature transform (SIFT) algorithm.
3. Matching the characteristic points of the non-wide-angle images and the characteristic points of the wide-angle images by using a preset algorithm to generate matched characteristic point pairs; preferably, the preset algorithm is a KD tree algorithm.
4. And calculating a homography matrix H _ i (i is a natural number larger than 0) from the non-wide-angle image to the wide-angle image according to the matching feature point pairs, wherein i is the ID number of the non-wide-angle camera.
In some embodiments, the method further comprises:
mapping the non-wide-angle image to a wide-angle coordinate system where a wide-angle image is located, and acquiring a corresponding coordinate range of the non-wide-angle image in the coordinate system where the wide-angle image is located;
and intercepting a color matching reference block matched with the non-wide-angle image on the wide-angle image according to the corresponding coordinate range.
Specifically, the coordinate range of the ith non-wide-angle image (generally, the coordinate ranges corresponding to the upper left corner and the lower right corner of the non-wide-angle image) in the coordinate system of the corresponding wide-angle image is obtained by using the homography matrix H _ i from the ith non-wide angle to the wide angle.
Further, a rectangular range of color-mixing reference blocks matched with the non-wide-angle image is cut out from the wide-angle image according to the corresponding coordinate range.
In some embodiments, performing the downsampling operation on the non-wide angle image specifically comprises: and performing downsampling on the non-wide-angle image according to the size of the color-mixing reference block corresponding to the non-wide-angle image to generate a downsampled image.
In some embodiments, the non-wide-angle image may also be downsampled according to the manually set size of the palette reference block to generate a downsampled image.
In some embodiments, the method specifically comprises: and performing LAB color gamut conversion operation on the color-mixing reference image blocks and the downsampled image, mixing colors of the downsampled image in the LAB color gamut, and generating the downsampled color-mixed image.
Specifically, a downsampled image and a color-mixing reference image block corresponding to the non-wide-angle image are transferred to an LAB color gamut; the statistically downsampled image and the toned reference block specify the pixel mean and standard deviation of the channels (typically all 3 channels of the LAB, or alternatively, the AB2 channels) on the LAB gamut and are toned.
More specifically, for pixels of the non-wide-angle image in the same established channel of the LAB gamut, the average value of the down-sampled image in this channel of the LAB gamut is first subtracted, then multiplied by this LAB channel (the standard deviation of the toned reference image block divided by the standard deviation of the down-sampled image), and then added with the average value of the toned reference image block in this channel of the LAB gamut to generate the down-sampled toned image.
Further, the method further comprises: and performing an RGB color gamut conversion operation on the downsampled toned image, namely converting the downsampled toned image into an RGB color gamut.
In some embodiments, setting a gain parameter, where the gain parameter participates in operation processing together with a pixel value of the downsampled image and a pixel value of the downsampled toned image, and generates a downsampled image gain array, where the implementation includes:
summing the gain parameter with the pixel value of the down-sampling color-mixing image to obtain a result as a molecule; summing the gain parameter and the pixel value of the down-sampling image, and taking the obtained result as a denominator; and dividing the numerator and the denominator to obtain a downsampling image gain array.
More specifically, the gain parameter is used to help ensure that the denominator is not zero and that locally large values are not generated that would result in gain array values that affect subsequent toning steps.
In some embodiments, the downsampled image gain array and the non-wide angle downsampled image have the same size.
In some embodiments, the upsampling operation is performed on the downsampled image gain array, typically using the resize function of openCV or other similar methods, resulting in a non-wide-angle image gain array.
Specifically, the non-wide angle image gain array and the original non-wide angle image have the same size.
In the embodiment of the disclosure, the wide-angle image is used as a reference for color matching of the non-wide-angle image, the overall effect of the spliced image is better than that of a spliced image in which color matching is only carried out through a superposition area, and splicing quality and excessive colors are enhanced; in addition, in the embodiment of the disclosure, a downsampling operation is performed on the non-wide-angle image, the conversion between the RGB color gamut and the LAB color gamut with large calculation amount is performed only on the downsampling size, and then only addition, subtraction and multiplication operations are involved in the color matching of the whole non-wide-angle image, so that the calculation amount is greatly reduced, the running speed is improved, and the color matching efficiency is further improved.
The embodiment of the present disclosure still further discloses a device 200 for splicing and toning panoramic images, which is specifically shown in fig. 2 and includes:
an image reference block determining module 201, configured to obtain a non-wide-angle image, and extract a color-mixing reference image block on a wide-angle image corresponding to the non-wide-angle image;
a generate downsample image module 202, configured to perform downsampling on the non-wide-angle image to generate a downsampled image;
a down-sampling image toning module 203, configured to tone the down-sampling image in the LAB color gamut with reference to the toned reference image block, and generate a down-sampling toned image;
a downsampled image gain array module 204 for generating a downsampled image gain array according to the pixel value of the downsampled image and the pixel value of the downsampled toned image;
a determine non-wide angle image gain array module 205 to perform an upsampling operation on the downsampled image gain array to generate a non-wide angle image gain array;
a non-wide-angle image toning module 206, configured to perform toning on the non-wide-angle image according to the non-wide-angle image gain array.
In some embodiments, the determine image reference block module is specifically configured to: acquiring a corresponding coordinate range of the non-wide-angle image in a coordinate system of the wide-angle image;
and intercepting a color matching reference block matched with the non-wide-angle image on the wide-angle image according to the corresponding coordinate range.
In some embodiments, the downsampled image toning module is specifically configured to: performing an LAB gamut conversion operation on the toned reference image block and the downsampled image, and toning the downsampled image in the LAB gamut.
In some embodiments, the downsampled image toning module is further to perform an RGB color gamut conversion operation on the downsampled toned image.
In some embodiments, the determining a downsampled image gain array module is further specifically configured to: presetting a gain parameter; and the gain parameters participate in operation processing together with the pixel values of the downsampled image and the pixel values of the downsampled color-mixing image to generate a downsampled image gain array.
In some embodiments, the determining a downsampled image gain array module is specifically configured to: summing the gain parameter with the pixel value of the down-sampling color-mixing image to obtain a result as a molecule; summing the gain parameter and the pixel value of the down-sampling image, and taking the obtained result as a denominator; and dividing the numerator and the denominator to obtain a downsampling image gain array.
The embodiment of the present disclosure further discloses a schematic diagram of an electronic device, as shown in fig. 3. Wherein, this electronic equipment 300 includes:
a memory 330 and one or more processors 310;
wherein the memory 330 is communicatively coupled to the one or more processors 310, the memory 330 stores instructions 332 executable by the one or more processors, and the instructions 332 are executable by the one or more processors 310 to cause the one or more processors 310 to perform the methods of the foregoing embodiments of the present disclosure.
In particular, the processor 310 and the memory 330 may be connected by a bus or other means, such as by a bus 340 in FIG. 3. Processor 310 may be a Central Processing Unit (CPU) and/or a graphics processor. Graphics Processing Unit (GPU). The Processor 310 may also be other general purpose processors, Digital Signal Processors (DSPs), Application Specific Integrated Circuits (ASICs), Field Programmable Gate Arrays (FPGAs) or other Programmable logic devices, discrete Gate or transistor logic devices, discrete hardware components, or any combination thereof.
The memory 330, which is a non-transitory computer-readable storage medium, may be used to store non-transitory software programs, non-transitory computer-executable programs, and modules. The processor 310 executes various functional applications of the processor and data processing by executing non-transitory software programs, instructions, and modules 332 stored in the memory 330.
The memory 330 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created by the processor 310, and the like. Further, memory 330 may include high speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid state storage device. In some embodiments, memory 330 optionally includes memory located remotely from processor 310, which may be connected to processor 310 via a network, such as through communication interface 320. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
An embodiment of the present disclosure also provides a computer-readable storage medium, in which computer-executable instructions are stored, and the computer-executable instructions are executed to perform the method in the foregoing embodiment of the present disclosure.
The foregoing computer-readable storage media include physical volatile and nonvolatile, removable and non-removable media implemented in any manner or technology for storage of information such as computer-readable instructions, data structures, program modules or other data. The computer-readable storage medium specifically includes, but is not limited to, a USB flash drive, a removable hard drive, a Read-Only Memory (ROM), a Random Access Memory (RAM), an erasable programmable Read-Only Memory (EPROM), an electrically erasable programmable Read-Only Memory (EEPROM), flash Memory or other solid state Memory technology, a CD-ROM, a Digital Versatile Disk (DVD), an HD-DVD, a Blue-Ray or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other medium which can be used to store the desired information and which can be accessed by a computer.
While the subject matter described herein is provided in the general context of execution in conjunction with the execution of an operating system and application programs on a computer system, those skilled in the art will recognize that other implementations may also be performed in combination with other types of program modules. Generally, program modules include routines, programs, components, data structures, and other types of structures that perform particular tasks or implement particular abstract data types. Those skilled in the art will appreciate that the subject matter described herein may be practiced with other computer system configurations, including hand-held devices, multiprocessor systems, microprocessor-based or programmable consumer electronics, minicomputers, mainframe computers, and the like, as well as distributed computing environments where tasks are performed by remote processing devices that are linked through a communications network. In a distributed computing environment, program modules may be located in both local and remote memory storage devices.
Those of ordinary skill in the art will appreciate that the various illustrative elements and method steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present disclosure.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present disclosure may be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure.
In summary, the present disclosure provides a method and an apparatus for stitching and toning a panoramic image, an electronic device and a computer-readable storage medium thereof. By the panoramic image splicing and color mixing method and device, the color mixing reference block is obtained from the wide-angle image corresponding to the non-wide-angle image and is used as the reference for color mixing of the non-wide-angle image, the color is excessive and more natural, and the splicing quality is greatly improved; meanwhile, the method performs downsampling operation on the non-wide-angle image, performs color gamut conversion with large calculation amount only on the downsampling size, and only involves simple addition, subtraction and multiplication operation on the color matching of the whole non-wide-angle image, so that the calculation amount is greatly reduced, the running speed is improved, and the color matching efficiency is further improved.
It is to be understood that the above-described specific embodiments of the present disclosure are merely illustrative of or illustrative of the principles of the present disclosure and are not to be construed as limiting the present disclosure. Accordingly, any modification, equivalent replacement, improvement or the like made without departing from the spirit and scope of the present disclosure should be included in the protection scope of the present disclosure. Further, it is intended that the following claims cover all such variations and modifications that fall within the scope and bounds of the appended claims, or equivalents of such scope and bounds.
Claims (14)
1. A method for splicing and toning panoramic images is characterized by comprising the following steps:
acquiring a non-wide-angle image, and extracting a color-mixing reference image block on a wide-angle image corresponding to the non-wide-angle image;
performing a downsampling operation on the non-wide-angle image to generate a downsampled image;
toning the down-sampling image in an LAB color domain by referring to the toning reference image block to generate a down-sampling toning image;
generating a downsampled image gain array according to the pixel value of the downsampled image and the pixel value of the downsampled color-mixing image;
performing an upsampling operation on the downsampled image gain array to generate a non-wide-angle image gain array;
and completing color matching on the non-wide-angle image according to the non-wide-angle image gain array.
2. The method according to claim 1, characterized in that it comprises in particular:
acquiring a corresponding coordinate range of the non-wide-angle image in a coordinate system of the wide-angle image;
and intercepting a color matching reference block matched with the non-wide-angle image on the wide-angle image according to the corresponding coordinate range.
3. The method according to claim 1, characterized in that it comprises in particular: performing an LAB gamut conversion operation on the toned reference image block and the downsampled image, and toning the downsampled image in the LAB gamut.
4. The method according to claim 1 or 3, characterized in that the method further comprises: an RGB gamut conversion operation is performed on the downsampled toned image.
5. The method of claim 1, further comprising: presetting a gain parameter;
and the gain parameters participate in operation processing together with the pixel values of the downsampled image and the pixel values of the downsampled color-mixing image to generate a downsampled image gain array.
6. The method according to claim 5, characterized in that the method comprises in particular:
summing the gain parameter with the pixel value of the down-sampling color-mixing image to obtain a result as a molecule;
summing the gain parameter and the pixel value of the down-sampling image, and taking the obtained result as a denominator;
and dividing the numerator and the denominator to obtain a downsampling image gain array.
7. The method of claim 5, wherein the toning the non-wide angle image according to the non-wide angle image gain array specifically comprises:
and performing operation processing on all pixels in the non-wide-angle image according to the non-wide-angle image gain array and the gain parameters to finish color matching.
8. The method of claim 1, further comprising: and acquiring the characteristic points on the non-wide-angle image and the wide-angle image to complete the matching of the characteristic points.
9. A panoramic image splicing and color mixing device is characterized by comprising:
the image reference block determining module is used for acquiring a non-wide-angle image and extracting a color-mixing reference image block on a wide-angle image corresponding to the non-wide-angle image;
a down-sampling image generation module for performing down-sampling operation on the non-wide-angle image to generate a down-sampling image;
the down-sampling image toning module is used for toning the down-sampling image in an LAB color gamut by referring to the toning reference image block to generate a down-sampling toning image;
determining a downsampling image gain array module, which is used for generating a downsampling image gain array according to the pixel value of the downsampling image and the pixel value of the downsampling color-mixing image;
a non-wide-angle image gain array determining module, configured to perform an upsampling operation on the downsampled image gain array to generate a non-wide-angle image gain array;
and the non-wide-angle image toning module is used for toning the non-wide-angle image according to the non-wide-angle image gain array.
10. The apparatus of claim 9, wherein the determine image reference block module is specifically configured to: acquiring a corresponding coordinate range of the non-wide-angle image in a coordinate system of the wide-angle image;
and intercepting a color matching reference block matched with the non-wide-angle image on the wide-angle image according to the corresponding coordinate range.
11. The apparatus of claim 9, wherein the downsampled image toning module is specifically configured to: performing an LAB gamut conversion operation on the toned reference image block and the downsampled image, and toning the downsampled image in the LAB gamut.
12. The apparatus of claim 9 or 11, wherein the downsampled color image toning module is further configured to perform an RGB color gamut conversion operation on the downsampled color toned image.
13. The apparatus of claim 9, wherein the means for determining a downsampled image gain array is further configured to: presetting a gain parameter; and the gain parameters participate in operation processing together with the pixel values of the downsampled image and the pixel values of the downsampled color-mixing image to generate a downsampled image gain array.
14. The apparatus of claim 13, wherein the means for determining a downsampled image gain array is specifically configured to: summing the gain parameter with the pixel value of the down-sampling color-mixing image to obtain a result as a molecule; summing the gain parameter and the pixel value of the down-sampling image, and taking the obtained result as a denominator; and dividing the numerator and the denominator to obtain a downsampling image gain array.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110150088.5A CN112884849A (en) | 2021-02-03 | 2021-02-03 | Panoramic image splicing and color matching method and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202110150088.5A CN112884849A (en) | 2021-02-03 | 2021-02-03 | Panoramic image splicing and color matching method and device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN112884849A true CN112884849A (en) | 2021-06-01 |
Family
ID=76056999
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202110150088.5A Pending CN112884849A (en) | 2021-02-03 | 2021-02-03 | Panoramic image splicing and color matching method and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112884849A (en) |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108156383A (en) * | 2017-12-29 | 2018-06-12 | 清华大学 | 1,000,000,000 pixel video acquisition method of high dynamic and device based on camera array |
CN109345485A (en) * | 2018-10-22 | 2019-02-15 | 北京达佳互联信息技术有限公司 | A kind of image enchancing method, device, electronic equipment and storage medium |
CN112233154A (en) * | 2020-11-02 | 2021-01-15 | 影石创新科技股份有限公司 | Color difference elimination method, device and equipment for spliced image and readable storage medium |
-
2021
- 2021-02-03 CN CN202110150088.5A patent/CN112884849A/en active Pending
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN108156383A (en) * | 2017-12-29 | 2018-06-12 | 清华大学 | 1,000,000,000 pixel video acquisition method of high dynamic and device based on camera array |
CN109345485A (en) * | 2018-10-22 | 2019-02-15 | 北京达佳互联信息技术有限公司 | A kind of image enchancing method, device, electronic equipment and storage medium |
CN112233154A (en) * | 2020-11-02 | 2021-01-15 | 影石创新科技股份有限公司 | Color difference elimination method, device and equipment for spliced image and readable storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP6563609B2 (en) | Efficient canvas view generation from intermediate views | |
US20170345214A1 (en) | High Resolution (HR) Panorama Generation Without Ghosting Artifacts Using Multiple HR Images Mapped to a Low-Resolution 360-Degree Image | |
CN107451952B (en) | Splicing and fusing method, equipment and system for panoramic video | |
CN112017222B (en) | Video panorama stitching and three-dimensional fusion method and device | |
CN111915483B (en) | Image stitching method, device, computer equipment and storage medium | |
CN108431751B (en) | Background removal | |
CN107948547B (en) | Processing method and device for panoramic video stitching and electronic equipment | |
CN109190617B (en) | Image rectangle detection method and device and storage medium | |
CN109035134B (en) | Panoramic image splicing method and device, electronic equipment and storage medium | |
CN109523462A (en) | A kind of acquisition methods and device of VR video screenshotss image | |
JP6345345B2 (en) | Image processing apparatus, image processing method, and image processing program | |
CN111179166B (en) | Image processing method, device, equipment and computer readable storage medium | |
CN113132708B (en) | Method and apparatus for acquiring three-dimensional scene image using fisheye camera, device and medium | |
CN117437118A (en) | Image processing method and device and electronic equipment | |
CN113160051A (en) | Image interpolation sampling method and device based on edge direction | |
US12094079B2 (en) | Reference-based super-resolution for image and video enhancement | |
CN112884849A (en) | Panoramic image splicing and color matching method and device | |
CN111402354A (en) | Color contrast enhancement drawing method, device and system suitable for optical transmission type head-mounted display | |
CN114648448A (en) | Image enhancement method, device, equipment and storage medium | |
US9723216B2 (en) | Method and system for generating an image including optically zoomed and digitally zoomed regions | |
CN114049288A (en) | Image generation method and device, electronic equipment and computer-readable storage medium | |
CN113570531A (en) | Image processing method, image processing device, electronic equipment and computer readable storage medium | |
CN113012085A (en) | Image processing method and device | |
Cheng et al. | Improved two-stage image inpainting with perceptual color loss and modified region normalization | |
CN116503562B (en) | Method for determining space building information model and fusing three-dimensional space model images |
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: 20210601 |
|
RJ01 | Rejection of invention patent application after publication |