Imaging color balancing method and device for array camera, equipment and medium
By employing a serial turn-by-turn update rule and a mapping table update count value in a large array camera system, the update frequency of the mapping table is controlled, thus solving the problem of high computational complexity and achieving efficient image color equalization processing, meeting the needs of real-time video processing.
Patent Information
- Application Number
- CN202511442220.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-10
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-10-10
AI Technical Summary
In large array camera systems, traditional color correction methods suffer from high computational complexity and slow processing speed, making it difficult to meet the requirements of real-time video processing.
The update frequency of the mapping table is controlled by a serial round-robin update rule and the update count value of the mapping table. By obtaining the mapping relationship between the reference image and the image to be processed, color correction is performed to generate a target detail image with the same color as the reference image.
It reduces computational complexity, improves image color balance processing efficiency, meets the requirements of real-time video processing, and reduces computing resources and video memory consumption.
Smart Images

Figure CN120916070A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of image processing and digital image correction, and in particular to an imaging color equalization method and device for an array camera, equipment and a medium. BACKGROUND
[0002] In an array camera system, due to the slight differences in optical characteristics, exposure compensation, white balance, etc. between each detail map sensor, the colors between different detail maps often cannot be consistent, thereby affecting the panoramic stitching and the final image quality. Although the traditional color correction method can perform real-time color equalization in the video stitching processing of a small array camera, it has problems such as slow processing speed, large consumption of computing resources and difficulty in meeting the requirements of real-time video processing in the scene of a large array camera (for example, 40-50 8K cameras). Therefore, there is an urgent need for a color equalization method that can reduce the computational complexity and improve the processing efficiency to realize the automatic matching and correction of the colors of the corresponding regions of the detail map and the panoramic map. SUMMARY
[0003] The present application provides an imaging color equalization method, device, equipment and medium for an array camera to reduce the computational complexity of image color equalization processing, improve the processing efficiency while ensuring the accuracy of color correction.
[0004] In a first aspect, the present application provides an imaging color equalization method for an array camera, the method comprising: obtaining a current image to be processed, and determining whether the current image to be processed meets a preset serial round-robin update rule based on the serial round-robin update rule; updating a mapping table update count value corresponding to the current image to be processed when the current image to be processed meets the serial round-robin update rule; obtaining a reference image corresponding to the current image to be processed when the mapping table update count value is equal to a preset value, and updating a mapping table of the current image to be processed and the reference image based on the reference image and the image to be processed; performing color correction on the current image to be processed based on the mapping table to obtain a target detail image with color consistent with the reference image.
[0005] In a second aspect, the present application also provides an imaging color equalization device for an array camera, the device comprising: a rule judgment module configured to obtain a current image to be processed, and determine whether the current image to be processed meets a preset serial round-robin update rule based on the serial round-robin update rule; a count value updating module, configured to update a mapping table updating count value corresponding to the current image to be processed when the current image to be processed meets the serial round-robin updating rule; a mapping table updating module, configured to obtain a reference image corresponding to the current image to be processed when the mapping table updating count value is equal to a preset value, and update a mapping table of the current image to be processed and the reference image based on the reference image and the image to be processed; a color correction module, configured to perform color correction on the current image to be processed based on the mapping table to obtain a target detail image with color consistent with the reference image.
[0006] In a third aspect, the present application also provides a computer device, which comprises a memory and a processor; the memory is configured to store a computer program; the processor is configured to execute the computer program and implement the imaging color equalization method for array cameras as described above when executing the computer program.
[0007] In a fourth aspect, the present application also provides a computer readable storage medium, which stores a computer program; the computer program is executed by a processor to make the processor implement the imaging color equalization method for array cameras as described above.
[0008] The present application discloses an imaging color equalization method, device, equipment and medium for array cameras, which obtains a current image to be processed, and determines whether the current image to be processed meets a preset serial round-robin updating rule based on the serial round-robin updating rule; updates a mapping table updating count value corresponding to the current image to be processed when the current image to be processed meets the serial round-robin updating rule; obtains a reference image corresponding to the current image to be processed when the mapping table updating count value is equal to a preset value, and updates a mapping table of the current image to be processed and the reference image based on the reference image and the image to be processed; performs color correction on the current image to be processed based on the mapping table to obtain a target detail image with color consistent with the reference image. The present application can further control the mapping table updating frequency through the serial round-robin updating rule and the mapping table updating count value, avoid unnecessary updating, reduce the computational complexity, and improve the color equalization processing efficiency of the image. BRIEF DESCRIPTION OF DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are some embodiments of the present application, and other drawings can also be obtained by those skilled in the art without creative labor.
[0010] Figure 1 is a schematic flowchart of a method for imaging color equalization for an array camera according to a first embodiment of the present application; Figure 2 is a schematic flowchart of determining whether to update a mapping table according to an embodiment of the present application; Figure 3 is a schematic flowchart of a method for imaging color equalization for an array camera according to a second embodiment of the present application; Figure 4 is a schematic flowchart of determining a mapping table update frequency according to an embodiment of the present application; Figure 5 is a schematic flowchart of a method for imaging color equalization for an array camera according to a third embodiment of the present application; Figure 6 is a schematic flowchart of mapping table construction according to an embodiment of the present application; Figure 7 is a schematic block diagram of an imaging color equalization apparatus for an array camera according to an embodiment of the present application; Figure 8 is a schematic block diagram of a computer device according to an embodiment of the present application. DETAILED DESCRIPTION
[0011] The technical solutions in the embodiments of the present application will be clearly and completely described with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only some of the embodiments of the present application, but not all of the embodiments of the present application. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative work fall within the scope of the present application.
[0012] The flowcharts shown in the drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor do they necessarily have to be executed in the order described. For example, some operations / steps can be further divided, combined or partially combined, so the actual execution order can be changed according to the actual situation.
[0013] It should be understood that the terms used in the present application specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in the present application specification and the appended claims, unless otherwise clear from the context, the singular forms "a", "an" and "the" are intended to include the plural forms.
[0014] It should also be understood that the term "and / or" used in the present application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes these combinations.
[0015] Embodiments of the present application provide an imaging color equalization method, device, equipment and medium for an array camera. The imaging color equalization method for the array camera can be applied to a server. The mapping table update frequency is further controlled by serially and alternately updating the rules and the mapping table update count value, unnecessary updates are avoided, the operation complexity is reduced, and the color equalization processing efficiency of the image is improved. The server can be a standalone server or a server cluster.
[0016] Some embodiments of the present application will be described in detail below with reference to the accompanying drawings. The following embodiments and features in the embodiments can be combined with each other without conflict.
[0017] Please refer to Figure 1 , Figure 1 is a schematic flowchart of an imaging color equalization method for an array camera provided by embodiments of the present application.
[0018] As Figure 1 shown, the imaging color equalization method for the array camera specifically includes steps S101 to S104.
[0019] S101, acquire a current image to be processed, and determine whether the current image to be processed meets a preset serial alternation update rule based on the serial alternation update rule. In one embodiment, the detail image currently subjected to color equalization is the current image to be processed. Specifically, after obtaining each captured detail image, color equalization is performed on all the detail images to make them consistent in color with the corresponding area images (reference images) in the panoramic image, so as to improve the quality of the stitched image. When performing color equalization on all the detail images, a distributed method can be used to perform color equalization on each detail image at the same time, or color equalization can be performed on all the detail images one by one. The image currently subjected to color equalization is the current image to be processed.
[0020] In one embodiment, the serial alternation update rule is to serially and alternately update the mapping table for all the detail images, so as to avoid updating the mapping table for all the detail images and their reference images every frame, reduce the mapping table update frequency, and reduce the operation time and memory consumption. For example, only the mapping table for the detail image 1 is updated in the first frame, only the mapping table for the detail image 2 is updated in the second frame, and so on, and the update is performed in a cyclic and alternating manner.
[0021] According to the serial round-robin updating rule, it is determined whether the current image to be processed is an image of the current frame that needs to update the mapping table. For example, assuming that 18 detail cameras are included in the array camera, each detail camera takes one detail image per frame, 18 detail images are obtained per frame, the last frame updates the mapping table is detail image 3, and the current frame needs to update the mapping table is detail image 4. If the current image to be processed is detail image 4, the serial round-robin updating rule needs to be updated, otherwise, the serial round-robin updating rule does not need to be updated.
[0022] Further, before the step S101, the method further includes: acquiring a panoramic image and at least one detail image collected by the array camera; performing region division on the panoramic image based on the at least one detail image, to obtain an image region corresponding to each of the detail images as a reference image corresponding to each of the detail images; and determining the current image to be processed in the at least one detail image.
[0023] In one embodiment, a plurality of detail images and a panoramic image corresponding to the plurality of detail images are collected by the array camera. The panoramic image and the detail images are preprocessed, such as noise reduction, smoothing or color space conversion, so as to better extract region features.
[0024] In one embodiment, the detail images are matched with the panoramic image to find corresponding regions of the detail images in the panoramic image. Specifically, features such as color histogram, texture feature, edge feature, etc. are extracted from the detail images; the extracted features are matched with features of corresponding regions in the panoramic image to determine a position of the current image to be processed in the panoramic image. According to the matching result, the panoramic image is divided into regions corresponding to the detail images. An image of each region is a reference image corresponding to each of the detail images.
[0025] In one embodiment, in the plurality of detail images, a detail image currently subjected to color equalization is taken as the current image to be processed.
[0026] Further, after the step S101, the method further includes: when the current image to be processed does not meet the serial round-robin updating rule, acquiring a historical mapping table corresponding to the current image to be processed; and performing color correction on the current image to be processed based on the historical mapping table to obtain the target detail image.
[0027] In one embodiment, when the current image to be processed does not meet the serial round-robin updating rule, i.e., the current image to be processed does not need to update the mapping table, a historical mapping table of the current image to be processed is acquired, color correction is performed on the current image to be processed according to the historical mapping table, and a target detail image consistent in color with the reference image is obtained.
[0028] In the above embodiments, the plurality of detail images captured by the array camera are updated by using a serial round-robin update rule to update the mapping table, avoiding updating every frame, reducing the update frequency of the mapping table, and not only meeting the frame rate requirement of real-time processing, but also reducing the overall operation time and memory consumption. Specifically, when updating the mapping table corresponding to all detail images every frame, the total time consumption of each frame is > 300 ms (millisecond, millisecond), the update frequency is about 1 second 3 times, and the required memory is about 500M (Megabyte, megabyte); when the serial round-robin update rule is implemented, the total time consumption of each frame is < 50 ms, the update frequency is about 1 time per 3 seconds, and the required memory is about 50M.
[0029] S102, when the current to-be-processed image meets the serial round-robin update rule, updating the mapping table update count value corresponding to the current to-be-processed image; In one embodiment, when the current to-be-processed image meets the serial round-robin update rule, that is, the current to-be-processed image needs to update the mapping table, the value of the mapping table update counter is obtained, and the mapping table update count value is updated, for example, the mapping table update count value is reduced by 1.
[0030] The mapping table update counter is used to determine whether the current to-be-processed image meets the preset update frequency, that is, whether it can be updated.
[0031] In one embodiment, for each detail image, a preset update frequency is set, that is, to update once every several times. The initial value of the mapping table update counter is the update frequency of the current to-be-processed image.
[0032] It can be understood that the image change degree of each detail image may be different, and therefore the update frequency of the mapping table of each detail image may also be different.
[0033] S103, when the mapping table update count value is equal to the preset value, obtaining a reference image corresponding to the current to-be-processed image, and updating the mapping table of the current to-be-processed image and the reference image based on the reference image and the to-be-processed image; In one embodiment, when the mapping table update count value is equal to the preset value, it indicates that the mapping table of the current to-be-processed image needs to be updated.
[0034] In one embodiment, a reference image corresponding to the current to-be-processed image is obtained, the reference image and the current to-be-processed image are processed to obtain the mapping relationship of each pixel in the to-be-processed image and the reference image, and a new mapping table is generated based on the mapping relationship to update the mapping table of the current to-be-processed image and the reference image.
[0035] In one embodiment, after the mapping table corresponding to the current image to be processed is updated, the value of the mapping table update counter is updated to the update frequency value corresponding to the current image to be processed. For example, as shown in FIG. 10, when the current image to be processed meets the serial round-robin update rule, i.e., the current image to be processed needs to update the mapping table, the value of the mapping table update counter is decremented by 1. When the mapping table update count value is equal to 0, it is determined that the current image to be processed can update the mapping table. When the mapping table update count value is not equal to 0, it is determined that the current image to be processed cannot update the mapping table. After the mapping table corresponding to the current image to be processed is updated, the value of the mapping table update counter is updated to the update interval corresponding to the current image to be processed. The update interval is equal to the update frequency value. Figure 2
[0036] In another embodiment, when the mapping table update count value is not equal to the preset value, indicating that the current image to be processed does not need to update the mapping table, the historical mapping table corresponding to the current image to be processed is obtained, and the current image to be processed is color corrected according to the historical mapping table to obtain a target detail image.
[0037] S104, color correcting the current image to be processed based on the mapping table to obtain a target detail image with color consistent with the reference image.
[0038] In one embodiment, the constructed mapping table is used as a lookup table to look up and convert each pixel value of the current image to be processed to generate a target detail image. The generated target detail image will have a color distribution consistent with the reference image.
[0039] In another embodiment, after the target detail image is generated, the color consistency of the target detail image and the reference image can be verified using histogram comparison, correlation analysis, and other methods. The mapping table is adjusted according to the verification result to improve the color correction accuracy.
[0040] The embodiment provides an imaging color balance method, device, equipment and medium for an array camera. A current image to be processed is acquired, and whether the current image to be processed meets a preset serial round updating rule is determined based on the serial round updating rule. When the current image to be processed meets the serial round updating rule, a mapping table updating count value corresponding to the current image to be processed is updated. When the mapping table updating count value is equal to a preset value, a reference image corresponding to the current image to be processed is acquired, and a mapping table of the current image to be processed and the reference image is updated based on the reference image and the image to be processed. The current image to be processed is color corrected based on the mapping table, and a target detail image consistent in color with the reference image is obtained. The serial round updating rule and the mapping table updating count value are used to further control the mapping table updating frequency, unnecessary updating is avoided, the operation complexity is reduced, and the color balance processing efficiency of the image is improved.
[0041] Please refer to Figure 3 , Figure 3 is a schematic flowchart of an imaging color balance method for an array camera provided by the embodiment.
[0042] As Figure 3 shown, the imaging color balance method for the array camera specifically includes steps S201 to S203.
[0043] S201, a historical detail image corresponding to the current image to be processed is acquired, wherein the historical detail image is separated from the acquisition time of the current image to be processed by a preset frame number. S202, the current image to be processed is compared with the historical detail image, and an image difference degree is obtained. S203, a mapping table updating frequency is determined based on a preset difference threshold and the image difference degree, and an initial value of a mapping table updating counter corresponding to the current image to be processed is determined based on the mapping table updating frequency.
[0044] In one embodiment, in order to further reduce the mapping table updating frequency, image changes are detected by sampling a histogram, and the mapping table updating frequencies of the detail images are controlled respectively, so that only the detail images with large changes are frequently updated.
[0045] In the embodiment, when the mapping table updating frequencies of each detail image are determined, the updating frequency is determined once every preset frame number. The historical detail image is the last sampling image corresponding to the current image to be processed. The current image to be processed is compared with the historical detail image, and the image difference degree of the current image to be processed and the historical detail image is determined. Specifically, whether to frequently update is determined by calculating the absolute value sum of the histogram difference (i.e., the image difference degree).
[0046] Further, the step S202 comprises: performing pixel histogram statistics on the current image to be processed to obtain a current pixel histogram corresponding to the current image to be processed; obtaining a historical pixel histogram corresponding to the historical detail image; and calculating the image difference degree value based on the current pixel histogram and the historical pixel histogram.
[0047] In one embodiment, the specific process of pixel histogram statistics comprises: reading the current image to be processed using an image processing library, ensuring that the image is read in grayscale mode for pixel histogram statistics; creating an array with a length of 256 (for an 8-bit grayscale image) and initializing it to 0, which will be used to store the number of pixels of each grayscale level; traversing each pixel in the image to obtain its grayscale level value, and for each pixel value, adding 1 to the count in the corresponding histogram array; dividing each value in the histogram array by the total number of pixels in the image to obtain the pixel proportion of each grayscale level; and generating the pixel histogram of the current image to be processed, i.e., the current pixel histogram, with the grayscale level as the horizontal axis and the pixel number or proportion as the vertical axis.
[0048] In one embodiment, as shown in FIG. 2, the pixel histogram of the current image to be processed is counted to obtain the current pixel histogram. It can be understood that the pixel histogram of the historical detail image can be obtained when the last color correction is performed, and thus the historical pixel histogram corresponding to the historical detail image can be directly obtained. Figure 4
[0049] The image difference degree of the current image to be processed and the historical detail image is obtained by calculating the sum of the absolute values of the histogram difference. Specifically, the calculation formula is wherein, the pixel histogram of the current image to be processed, is the historical pixel histogram, and sum represents the sum.
[0050] Further, the determination of the mapping table update frequency based on the preset difference threshold and the image difference degree comprises: when the image difference degree is less than the preset threshold, setting the preset update frequency as the mapping table update frequency; and when the image difference degree is greater than or equal to the preset threshold, setting the product of a preset multiple and the preset update frequency as the mapping table update frequency.
[0051] In one embodiment, the preset threshold and the preset update frequency can be freely set by the user according to the actual situation.
[0052] When the image difference degree is less than the preset threshold, it indicates that the image change degree is small, and the mapping table can be temporarily suspended for updating; when the image difference degree is greater than or equal to the preset threshold, it indicates that the image change degree is large, and the mapping table needs to be updated in a timely manner.
[0053] In one embodiment, when the image difference is less than a preset threshold, the preset update frequency is used as the mapping table update frequency.
[0054] When the image difference is greater than or equal to a preset threshold, the product of the preset update frequency and the preset multiple is used as the new mapping table update frequency to temporarily postpone updating the mapping table of the current image to be processed.
[0055] For example, such as Figure 4 As shown, when When the value is greater than or equal to the preset threshold, the mapping table update frequency reverts to the preset update frequency (i.e., the default value). When the value is less than a preset threshold, the mapping table update frequency is doubled to increase the mapping table update interval for the current image to be processed.
[0056] In another embodiment, when the image difference is greater than or equal to a preset threshold, the mapping table update count value is directly assigned to 1 so that the mapping table of the current image to be processed can be updated in a timely manner in the next round of updates.
[0057] In the above embodiments, the mapping table update is controlled by a serial round-robin update rule and a mapping table update frequency. If the current image to be processed requires an update to the mapping table, then the mapping table is updated; otherwise, the historical mapping table can be used directly for color equalization. When using the mapping table for color equalization, it is not necessary to update the mapping table every time, thus separating the mapping table update from its use. This reduces computational frequency and memory consumption while ensuring color equalization effects, making it suitable for high frame rate video processing scenarios. When a dynamic update frequency algorithm is used, computational resources can be further optimized.
[0058] Please see Figure 5 , Figure 5 This is a schematic flowchart of an imaging color equalization method for an array camera provided in an embodiment of this application.
[0059] like Figure 5 As shown, the imaging color equalization method for an array camera specifically includes steps S301 to S303.
[0060] S301. Perform pixel histogram statistics on the reference image to obtain the reference image histogram; S302. Accumulate the histogram of the reference image and the histogram of the current pixel corresponding to the current image to be processed to obtain the first cumulative distribution function table corresponding to the reference image and the second cumulative distribution function table corresponding to the current image to be processed. S303, determining the corresponding relationship of each pixel value between the current image to be processed and the reference image based on the first cumulative distribution function table and the second cumulative distribution function table, and generating the mapping table.
[0061] In one embodiment, the specific process of pixel histogram statistics includes: reading the reference image using an image processing library, ensuring that the image is read in grayscale mode for pixel histogram statistics; creating an array of length 256 (for 8-bit grayscale images), initialized to 0, which will be used to store the number of pixels for each grayscale level; traversing each pixel in the image, obtaining its grayscale level value, and for each pixel value, adding 1 to the count in the corresponding histogram array; dividing each value in the histogram array by the total number of pixels in the image to obtain the pixel proportion for each grayscale level; generating the pixel histogram of the reference image, i.e. the reference image histogram, with the grayscale level as the horizontal axis and the pixel number or proportion as the vertical axis.
[0062] In one embodiment, for the reference image histogram, the pixel proportions are sequentially accumulated from pixel value 0 to 255, with the formula , to obtain the first cumulative distribution function table , where j is the pixel value in the reference image. For the current pixel histogram of the current image to be processed, the pixel proportions are also sequentially accumulated from pixel value 0 to 255, with the formula , to obtain the second cumulative distribution function table , where i is the pixel value in the current image to be processed.
[0063] In one embodiment, for each pixel value i in the current image to be processed, the pixel value j is found in the cumulative distribution of the reference image such that and are as close as possible, thereby determining the mapping relationship , and generating the mapping table. This mapping table establishes the corresponding relationship between the pixel values of the detail image and the reference image, providing a basis for subsequent color correction.
[0064] Specifically, as shown in Figure 6 , the second cumulative distribution function value corresponding to each pixel value in the current image to be processed is found from the second cumulative distribution function table, and the smallest pixel value j is found in the first cumulative distribution function table such that , when , the mapping relationship is , , when .
[0065] In the above embodiment, by performing fine statistics and normalization processing on the histogram, and then establishing a detailed pixel mapping relationship through the cumulative distribution matching method, the color adjustment between the detail map and the reference map has high precision. By using the cumulative distribution function matching method, the accuracy of the mapping relationship is ensured, and the color inconsistency between adjacent detail maps is effectively reduced. Secondly, by pre-calculating the histogram and the cumulative distribution, the mapping table is quickly constructed, and the processing time of each frame of image is greatly shortened.
[0066] Referring to Figure 7 , Figure 7 An embodiment of the present application provides a schematic block diagram of an imaging color equalization device for an array camera, which is used to perform the aforementioned imaging color equalization method for an array camera. The imaging color equalization device for an array camera can be configured in a server.
[0067] As Figure 7 shown, the imaging color equalization device for an array camera 400 comprises: A rule judgment module 401 is configured to obtain a current image to be processed, and determine whether the current image to be processed meets a preset serial round-robin update rule based on the serial round-robin update rule. A count value updating module 402 is configured to update a mapping table update count value corresponding to the current image to be processed when the current image to be processed meets the serial round-robin update rule. A mapping table updating module 403 is configured to obtain a reference image corresponding to the current image to be processed when the mapping table update count value is equal to a preset value, and update a mapping table of the current image to be processed and the reference image based on the reference image and the image to be processed. A color correction module 404 is configured to perform color correction on the current image to be processed based on the mapping table to obtain a target detail image with color consistent with the reference image.
[0068] Further, the imaging color equalization device for an array camera 400 further comprises a color correction module, which comprises: A historical mapping table obtaining unit is configured to obtain a historical mapping table corresponding to the current image to be processed when the current image to be processed does not meet the serial round-robin update rule. A color correction unit is configured to perform color correction on the current image to be processed based on the historical mapping table to obtain the target detail image.
[0069] Further, the imaging color equalization device for an array camera 400 further comprises a mapping table update frequency determination module, which comprises: a historical detail image acquisition unit, configured to acquire a historical detail image corresponding to the current to-be-processed image, wherein the historical detail image is separated from the acquisition time of the current to-be-processed image by a preset frame number; an image difference degree obtaining unit, configured to compare the current to-be-processed image with the historical detail image to obtain an image difference degree; a mapping table update frequency determining unit, configured to determine a mapping table update frequency based on a preset difference threshold and the image difference degree, and determine an initial value of a mapping table update counter corresponding to the current to-be-processed image based on the mapping update frequency.
[0070] Further, the mapping table update frequency determining unit is specifically configured to: when the image difference degree is less than the preset threshold, take a preset update frequency as the mapping table update frequency; when the image difference degree is greater than or equal to the preset threshold, take a product result of a preset multiple and the preset update frequency as the mapping table update frequency.
[0071] Further, the image difference degree obtaining unit comprises: a current pixel histogram obtaining sub-unit, configured to perform pixel histogram statistics on the current to-be-processed image to obtain a current pixel histogram corresponding to the current to-be-processed image; a historical pixel histogram obtaining sub-unit, configured to acquire a historical pixel histogram corresponding to the historical detail image; an image difference degree value calculating sub-unit, configured to calculate the image difference degree value based on the current pixel histogram and the historical pixel histogram.
[0072] Further, the mapping table update module 403 comprises: a reference image histogram obtaining unit, configured to perform pixel histogram statistics on the reference image to obtain a reference image histogram of the reference image; a cumulative distribution function table obtaining unit, configured to respectively perform cumulative calculation on the reference image histogram and a current pixel histogram corresponding to the current to-be-processed image to obtain a first cumulative distribution function table corresponding to the reference image and a second cumulative distribution function table corresponding to the current to-be-processed image; a mapping table generating unit, configured to determine a corresponding relationship between each pixel value of the current to-be-processed image and the reference image based on the first cumulative distribution function table and the second cumulative distribution function table, and generate the mapping table.
[0073] Further, the imaging color equalization apparatus 400 for the array camera further comprises a current image to be processed acquisition module, which comprises: an image acquisition unit configured to acquire a panoramic image and at least one detail image collected by the array camera; a reference image determination unit configured to divide the panoramic image into image regions based on the at least one detail image, and obtain an image region corresponding to each of the detail images as a reference image corresponding to the detail image; a current image to be processed determination unit configured to determine the current image to be processed in the at least one detail image.
[0074] It should be noted that, for the convenience and brevity of description, the specific working processes of the above-described apparatus and modules can refer to the corresponding processes in the foregoing method embodiments, which will not be described herein.
[0075] The apparatus described above can be implemented in the form of a computer program, which can run on a computer device as shown in Figure 8 .
[0076] Please refer to Figure 8 , Figure 8 is a structural schematic block diagram of a computer device provided by an embodiment of the present application. The computer device can be a server.
[0077] Referring to Figure 8 , the computer device comprises a processor, a memory and a network interface connected through a system bus, wherein the memory can comprise a non-volatile storage medium and an internal memory.
[0078] The non-volatile storage medium can store an operating system and a computer program. The computer program comprises program instructions, which, when executed, can cause the processor to execute any one of the imaging color equalization methods for the array camera.
[0079] The processor is configured to provide computing and control capabilities to support the operation of the entire computer device.
[0080] The internal memory provides an environment for the running of the computer program in the non-volatile storage medium, which, when executed by the processor, can cause the processor to execute any one of the imaging color equalization methods for the array camera.
[0081] The network interface is configured to perform network communication, such as sending assigned tasks, etc. Those skilled in the art can understand that Figure 8It should be understood that the structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied. The specific computer device can include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0082] It should be understood that the processor can be a central processing unit (CPU), and the processor can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0083] In one embodiment, the processor is configured to run a computer program stored in the memory to implement the following steps: obtain a current image to be processed, and determine whether the current image to be processed meets a preset serial round-robin update rule based on the serial round-robin update rule; update a mapping table update count value corresponding to the current image to be processed when the current image to be processed meets the serial round-robin update rule; obtain a reference image corresponding to the current image to be processed when the mapping table update count value is equal to a preset value, and update a mapping table of the current image to be processed and the reference image based on the reference image and the image to be processed; perform color correction on the current image to be processed based on the mapping table to obtain a target detail image with a color consistent with the reference image.
[0084] In one embodiment, after implementing the step of obtaining a current image to be processed, and determining whether the current image to be processed meets a preset serial round-robin update rule based on the serial round-robin update rule, the processor is further configured to implement: obtain a historical mapping table corresponding to the current image to be processed when the current image to be processed does not meet the serial round-robin update rule; perform color correction on the current image to be processed based on the historical mapping table to obtain the target detail image.
[0085] In one embodiment, before implementing the updating of the mapping table update count value corresponding to the current image to be processed when the current image to be processed meets the serial round-robin updating rule, the processor is further configured to implement: obtaining a historical detail image corresponding to the current image to be processed, wherein the historical detail image is separated from the acquisition time of the current image to be processed by a preset frame number; comparing the current image to be processed with the historical detail image to obtain an image difference degree; determining a mapping table update frequency based on a preset difference threshold and the image difference degree, and determining an initial value of a mapping table update counter corresponding to the current image to be processed based on the mapping update frequency.
[0086] In one embodiment, when implementing the determination of the mapping table update frequency based on the preset difference threshold and the image difference degree, the processor is configured to implement: when the image difference degree is less than the preset threshold, taking a preset update frequency as the mapping table update frequency; when the image difference degree is greater than or equal to the preset threshold, taking a product result of a preset multiple and the preset update frequency as the mapping table update frequency.
[0087] In one embodiment, when implementing the comparison of the current image to be processed with the historical detail image to obtain an image difference degree, the processor is configured to implement: performing pixel histogram statistics on the current image to be processed to obtain a current pixel histogram corresponding to the current image to be processed; obtaining a historical pixel histogram corresponding to the historical detail image; calculating the image difference degree value based on the current pixel histogram and the historical pixel histogram.
[0088] In one embodiment, when implementing the updating of the mapping table of the current image to be processed and the reference image, the processor is configured to implement: performing pixel histogram statistics on the reference image to obtain a reference image histogram of the reference image; respectively performing accumulation calculation on the reference image histogram and a current pixel histogram corresponding to the current image to be processed to obtain a first cumulative distribution function table corresponding to the reference image and a second cumulative distribution function table corresponding to the current image to be processed; determining the corresponding relationship between each pixel value of the current image to be processed and the reference image based on the first cumulative distribution function table and the second cumulative distribution function table, and generating the mapping table.
[0089] In one embodiment, before the processor implements acquiring a current image to be processed and determining whether the current image to be processed meets the serial round-robin update rule based on the preset serial round-robin update rule, the processor is further configured to implement: acquiring a panoramic image and at least one detail image collected by the array camera; dividing the panoramic image into regions based on the at least one detail image to obtain an image region corresponding to each of the detail images as a reference image corresponding to the detail image; determining the current image to be processed in the at least one detail image.
[0090] In an embodiment of the present application, a computer readable storage medium is also provided, which stores a computer program. The computer program includes program instructions. The processor executes the program instructions to implement any one of the imaging color balancing methods for the array camera provided in the embodiments of the present application.
[0091] The computer readable storage medium can be an internal storage unit of the computer device, for example, a hard disk or a memory of the computer device. The computer readable storage medium can also be an external storage device of the computer device, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc.
[0092] The above merely illustrates the specific embodiments of the present application, but the protection scope of the present application is not limited to this. Any person skilled in the art can easily think of various equivalent modifications or replacements within the technical range disclosed in the present application, and these modifications or replacements should be covered in the protection scope of the present application. Therefore, the protection scope of the present application should be subject to the protection scope of the claims.
Claims
1. An imaging color equalization method for an array camera, characterized by, The method comprises the following steps: acquiring a current image to be processed, and determining whether the current image to be processed meets a preset serial round-robin update rule based on the serial round-robin update rule; when the current image to be processed meets the serial round-robin update rule, updating a mapping table update count value corresponding to the current image to be processed; when the mapping table update count value is equal to a preset value, acquiring a reference image corresponding to the current image to be processed, and updating a mapping table of the current image to be processed and the reference image based on the reference image and the image to be processed; based on the mapping table, performing color correction on the current image to be processed to obtain a target detail image with a color consistent with that of the reference image.
2. The method for imaging color equalization of an array camera according to claim 1, wherein, After the step of acquiring a current image to be processed, and determining whether the current image to be processed meets a preset serial round-robin update rule based on the serial round-robin update rule, the method further comprises the following steps: when the current image to be processed does not meet the serial round-robin update rule, acquiring a historical mapping table corresponding to the current image to be processed; based on the historical mapping table, performing color correction on the current image to be processed to obtain the target detail image.
3. The method for imaging color equalization of an array camera according to claim 1, wherein, Before the step of when the current image to be processed meets the serial round-robin update rule, updating a mapping table update count value corresponding to the current image to be processed, the method further comprises the following steps: acquiring a historical detail image corresponding to the current image to be processed, wherein the historical detail image is separated from the current image to be processed by a preset number of frames; comparing the current image to be processed with the historical detail image to obtain an image difference degree; based on a preset difference threshold and the image difference degree, determining a mapping table update frequency, and based on the mapping table update frequency, determining an initial value of a mapping table update counter corresponding to the current image to be processed.
4. The method for imaging color equalization of an array camera according to claim 3, wherein, The step of based on a preset difference threshold and the image difference degree, determining a mapping table update frequency comprises the following steps: when the image difference degree is less than the preset threshold, taking a preset update frequency as the mapping table update frequency; when the image difference degree is greater than or equal to the preset threshold, taking a product of a preset multiple and the preset update frequency as the mapping table update frequency.
5. The method for imaging color equalization of an array camera of claim 3, wherein, The step of comparing the current image to be processed with the historical detail image to obtain an image difference degree comprises the following steps: performing pixel histogram statistics on the current image to be processed to obtain a current pixel histogram corresponding to the current image to be processed; acquiring a historical pixel histogram corresponding to the historical detail image; based on the current pixel histogram and the historical pixel histogram, calculating to obtain the image difference degree value.
6. The method for imaging color equalization of an array camera of claim 1, wherein, The step of updating a mapping table of the current image to be processed and the reference image comprises the following steps: performing pixel histogram statistics on the reference image to obtain a reference image histogram of the reference image; respectively performing accumulation calculation on the reference image histogram and a current pixel histogram corresponding to the current image to be processed to obtain a first cumulative distribution function table corresponding to the reference image and a second cumulative distribution function table corresponding to the current image to be processed; Based on the first cumulative distribution function table and the second cumulative distribution function table, a corresponding relationship of each pixel value between the current image to be processed and the reference image is determined, and the mapping table is generated.
7. The method for imaging color equalization of an array camera according to any one of claims 1 to 6, characterized in that, Before the current image to be processed is obtained and based on a preset serial round-robin update rule, whether the current image to be processed conforms to the serial round-robin update rule is determined, the method further includes: obtaining a panoramic image and at least one detail image collected by the array camera; dividing the panoramic image into regions based on the at least one detail image, and obtaining an image region corresponding to each of the detail images as a reference image corresponding to each of the detail images; determining the current image to be processed in the at least one detail image.
8. An imaging color equalization apparatus for an array camera, characterized by, The method includes: a rule judgment module configured to obtain a current image to be processed and determine whether the current image to be processed conforms to a preset serial round-robin update rule; a count value update module configured to update a mapping table update count value corresponding to the current image to be processed when the current image to be processed conforms to the serial round-robin update rule; a mapping table update module configured to obtain a reference image corresponding to the current image to be processed and update a mapping table of the current image to be processed and the reference image based on the reference image and the image to be processed when the mapping table update count value is equal to a preset value; a color correction module configured to perform color correction on the current image to be processed based on the mapping table to obtain a target detail image with color consistent with the reference image.
9. A computer device, comprising: The computer device includes a memory and a processor; the memory is configured to store a computer program; the processor is configured to execute the computer program and implement the imaging color equalization method for the array camera according to any one of claims 1 to 7 when the computer program is executed.
10. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, and the computer program is executed by the processor to make the processor implement the imaging color equalization method for the array camera according to any one of claims 1 to 7.
Citation Information
Patent Citations
Image processing method and device, equipment, storage medium and program product
CN117745535A
Low-computing-power ultra-high-definition panoramic monitoring image splicing method and device
CN119653053A
User interface apparatus
US20130205261A1