Panoramic-image processing method and apparatus, and electronic device and readable storage medium

By calculating pixel weights in the panoramic image and generating a weighted histogram, the problem of equalization imbalance caused by pixel repetition in the panoramic image is solved, the effect of histogram equalization is improved, and the brightness distribution and contrast adjustment of the panoramic image is ensured.

WO2024244332A1PCT designated stage expired Publication Date: 2024-12-05FIBOCOM AUTO INC
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
PCT/CN2023/133688
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-05-29
Filing Date
2023-11-23
Publication Date
2024-12-05

AI Technical Summary

Technical Problem

The existing histogram equalization method has poor effect when processing panoramic images, mainly due to the large number of repeated pixels in the panoramic images, resulting in equalization imbalance.

Method used

By obtaining pixel position parameters in the panoramic image, calculating the weights of the pixels, and generating a weighted histogram based on these weights for equalization operations, avoiding the equalization imbalance caused by pixel repetition.

Benefits of technology

It improves the histogram equalization effect in panoramic image application scenarios, ensures that brightness is better distributed on the histogram, and enhances local contrast without affecting the overall contrast.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023133688_05122024_PF_FP_ABST
    Figure CN2023133688_05122024_PF_FP_ABST
Patent Text Reader

Abstract

Disclosed are a panoramic-image processing method and apparatus, and an electronic device and a readable storage medium. The panoramic-image processing method comprises: acquiring a position parameter corresponding to each pixel in a panoramic image, and determining the weight for each pixel according to the corresponding position parameter; on the basis of the weight corresponding to each pixel, generating a weighted histogram corresponding to the panoramic image; and performing an equalization operation on the weighted histogram.
Need to check novelty before this filing date? Find Prior Art

Description

Panoramic image processing method, device, electronic device and readable storage medium

[0001] Citation of Related Applications

[0002] This disclosure claims all rights and interests in the invention patent application with application number 202310619110.5 filed with the State Intellectual Property Office of the People's Republic of China on May 29, 2023, entitled "Panoramic image processing method, device, electronic device and readable storage medium", and incorporates the entire contents thereof into this disclosure by reference.

[0003] field

[0004] The present disclosure generally relates to the field of image processing, and more particularly to a panoramic image processing method, apparatus, electronic device, and readable storage medium.

[0005] background

[0006] Histogram equalization is a common method in image processing that uses image histograms to adjust contrast and has a wide range of applications. While this method works well for general images, it has a poor effect on panoramic images, as they contain a large number of repeated pixels, resulting from equirectangular projection of a panoramic sphere.

[0007] Overview

[0008] In one aspect, the present disclosure provides a panoramic image processing method, comprising:

[0009] Obtaining position parameters corresponding to each pixel in the panoramic image, and determining the weight of each pixel according to the corresponding position parameters;

[0010] generating a weighted histogram corresponding to the panoramic image based on the weights corresponding to the pixels; and

[0011] An equalization operation is performed on the weighted histogram.

[0012] In some embodiments, the step of determining the weight of each pixel according to the corresponding position parameter includes:

[0013] Acquire a panoramic sphere corresponding to the panoramic image;

[0014] For each pixel, determining a first position of the pixel in the panoramic image and a second position of the pixel in the panoramic sphere according to the position parameter; and

[0015] A repetition rate of the pixel is calculated according to the first position and the second position, and the repetition rate is used as a weight of the pixel.

[0016] In some embodiments, the step of calculating the repetition rate of the pixel based on the first position and the second position includes:

[0017] Determining a pixel row width of a pixel row at which the first position is located, and determining a latitude perimeter at the latitude at which the second position is located; and

[0018] The quotient of the latitudinal perimeter divided by the pixel row width is calculated, and the quotient is used as the repetition rate corresponding to the pixel.

[0019] In some embodiments, the step of determining the weight of each pixel according to the corresponding position parameter includes:

[0020] Acquire a panoramic sphere corresponding to the panoramic image;

[0021] For each pixel, determining a pitch angle of the pixel in the panoramic sphere according to the position parameter; and

[0022] A cosine value corresponding to the absolute value of the pitch angle is calculated, and the cosine value is used as the weight corresponding to the pixel.

[0023] In some embodiments, the step of generating a weighted histogram corresponding to the panoramic image based on the weight corresponding to each pixel includes:

[0024] Determining the grayscale pixels corresponding to each grayscale value in the panoramic image;

[0025] For each grayscale value, taking the sum of the weights of the grayscale pixels as the number of pixels corresponding to the grayscale value; and

[0026] The weighted histogram is obtained by combining the number of pixels corresponding to each grayscale value.

[0027] In some embodiments, the step of obtaining the weighted histogram by integrating the number of pixels corresponding to each grayscale value includes:

[0028] The sum of the weights of all the pixels is taken as the total number of pixels of the panoramic image;

[0029] For each grayscale value, calculating a ratio of pixel data corresponding to the grayscale value to the total number of pixels, and using the ratio as the amount of data corresponding to the grayscale value; and

[0030] The weighted histogram is obtained by taking the data amount as the vertical axis data.

[0031] In some embodiments, the step of performing an equalization operation on the weighted histogram comprises:

[0032] For each grayscale value in the weighted histogram, obtaining the data amount corresponding to the grayscale value;

[0033] Determining a target grayscale value of the grayscale value according to the data amount; and

[0034] The grayscale value of the pixel corresponding to the grayscale value in the panoramic image is set as the target grayscale value.

[0035] On the other hand, the present disclosure further provides a panoramic image processing device, comprising:

[0036] A first acquisition module is configured to obtain a position parameter corresponding to each pixel in the panoramic image, and determine a weight of each pixel according to the corresponding position parameter;

[0037] a first generating module configured to generate a weighted histogram corresponding to the panoramic image based on the weight corresponding to each pixel; and

[0038] The first execution module is configured to perform an equalization operation on the weighted histogram.

[0039] On the other hand, the present disclosure also provides an electronic device, which includes a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein the computer program implements the panoramic image processing method described in the present disclosure when executed by the processor.

[0040] On the other hand, the present disclosure further provides a computer-readable storage medium storing a computer program, which implements the steps of the panoramic image processing method described in the present disclosure when the computer program is executed by a processor.

[0041] BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0043] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for the embodiments. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0044] FIG1 is a flow chart of a first embodiment of a panoramic image processing method disclosed herein;

[0045] FIG2 is a schematic diagram of projection between a panoramic sphere and a panoramic image in the panoramic image processing method disclosed herein; and

[0046] FIG3 is a schematic diagram of the module structure of the electronic device disclosed herein.

[0047] Details

[0048] It should be understood that the specific embodiments described herein are only used to explain the present disclosure and are not used to limit the present disclosure. In order to enable those skilled in the art to better understand the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, not all of the embodiments. Based on the embodiments in the present disclosure, all other embodiments obtained by ordinary technicians in this field without making creative work should fall within the scope of protection of the present disclosure.

[0049] The present disclosure provides a panoramic image processing method. Referring to FIG1 , FIG1 is a flow chart of a first embodiment of the panoramic image processing method of the present disclosure. The method includes:

[0050] Step S10, obtaining position parameters corresponding to each pixel in the panoramic image, and determining the weight of each pixel according to the corresponding position parameters;

[0051] Step S20, generating a weighted histogram corresponding to the panoramic image based on the weight corresponding to each pixel; and

[0052] Step S30: performing an equalization operation on the weighted histogram.

[0053] In certain embodiments, the position parameter is used to indicate the position of a pixel in the panoramic image. It is understood that the specific form of the position parameter can be selected based on the actual application scenario and needs. For example, generally, the panoramic image is rectangular, and a coordinate system is established with a horizontal line in the panoramic image as the horizontal axis and a vertical line as the vertical axis. The origin of the coordinate system is the midpoint of the vertical line where the left edge is located. The horizontal length is used as the horizontal axis parameter, and the vertical length is used as the vertical axis parameter. In this way, the position parameter can be expressed as a combination of the horizontal axis coordinate and the vertical axis coordinate; wherein the horizontal length and the vertical length can be length units or pixel numbers; it is understood that the above is only an explanation of the position parameter setting in one embodiment. In actual applications, the position parameter can be specifically set based on the actual application needs, such as adjusting the midpoint position, selecting a specific unit of coordinates, or using a matrix to represent it.

[0054] In some embodiments, the weight is used to indicate how much a pixel contributes to the overall image.

[0055] It is understandable that the panoramic image is obtained by equidistant cylindrical projection of the panoramic sphere. Therefore, each pixel in the panoramic image can correspond to one or more pixels on the panoramic sphere, and the correspondence between the pixels in the panoramic image and the pixels in the panoramic sphere is consistent. Therefore, when the position parameters of the pixels in the panoramic image are determined, their position parameters in the panoramic sphere are also determined. The mapping ratio relationship of the pixels in the projection can be determined by the position of the pixels in the panoramic image and the panoramic sphere. It is understandable that the impact caused by each pixel in the panoramic sphere is 1 unit. When the pixel in the panoramic sphere corresponds to multiple pixels in the full image, such as 1:2, the impact of the pixel on the panoramic image is 2 units. Therefore, the impact of the pixel needs to be weakened. Therefore, the weight used to adjust the degree of pixel influence can be determined by the pixel position parameter.

[0056] It can be understood that the histogram is a statistical chart with discrete grayscale values ​​as the horizontal axis and the frequency corresponding to the grayscale values ​​as the vertical axis; it should be noted that in some scenarios, the number of pixels corresponding to the grayscale value can also be used as the vertical axis, and the frequency corresponding to the grayscale value can be used as the vertical axis for subsequent explanation. Other scenarios can be executed by analogy and will not be repeated here.

[0057] The weighted histogram can be obtained by optimizing the original histogram by weight. In certain embodiments, the contribution of each grayscale value pixel to the frequency in the original histogram is adjusted according to the weight, thereby obtaining the weighted histogram.

[0058] Equalization uses a histogram to adjust the contrast of an image. This method distributes brightness more effectively across the histogram, enhancing local contrast without affecting overall contrast. The specific equalization method chosen depends on the application scenario and needs.

[0059] This embodiment can determine the mapping relationship between the pixel in the panoramic image and the panoramic sphere through the pixel position parameters. The pixel weight obtained thereby can reflect the degree of influence of the pixel on the panoramic image. Therefore, the weighted histogram generated based on the weight can avoid the imbalance problem caused by pixel duplication, and can improve the processing effect of histogram equalization in the panoramic application scenario.

[0060] In certain embodiments, in a second embodiment of the panoramic image processing method of the present disclosure proposed based on the first embodiment of the present disclosure, step S10 includes:

[0061] Step S11, obtaining a panoramic sphere corresponding to the panoramic image;

[0062] Step S12, for each pixel, determining a first position of the pixel in the panoramic image and a second position of the pixel in the panoramic sphere according to the position parameter; and

[0063] Step S13: Calculate the repetition rate of the pixel according to the first position and the second position, and use the repetition rate as the weight of the pixel.

[0064] The first position in the panoramic image can be determined using the aforementioned method; the second position in the panoramic sphere can be determined using the precision and latitude. It's understood that the first position of a pixel in the panoramic image and its second position in the panoramic sphere are fixed; the mapping relationship between the pixels in the panoramic sphere and the projections into the panoramic image is also fixed. Therefore, the pixel repetition rate can be determined using the first and second positions; the repetition rate indicates the mapping ratio of the pixels in the projection. Based on the above description, it can be understood that the pixel weight can be determined using the mapping ratio.

[0065] In certain embodiments, step S13 comprises:

[0066] Step S131, determining the pixel row width of the pixel row where the first position is located, and determining the latitude perimeter of the latitude where the second position is located; and

[0067] Step S132: Calculate the quotient of the latitudinal perimeter divided by the pixel row width, and use the quotient as the repetition rate corresponding to the pixel.

[0068] The pixel row width refers to the length of the pixel row where the first position is located. It is understandable that, generally, the length of each pixel row in the panoramic image is the same, which is the width of the panoramic image. Therefore, in practical applications, the width of the panoramic image can be directly used as the pixel row width.

[0069] The latitude circumference refers to the circumference of the circle corresponding to the latitude of the second position; it can be understood that the size of the panoramic sphere is fixed, so the circumference of the circle corresponding to each latitude of the panoramic sphere is also fixed. Therefore, after determining the second position, the latitude circumference can be obtained based on the second position; the specific latitude circumference can be determined based on actual needs using radius calculation, pixel number statistics, etc.

[0070] It should be noted that the pixel row width and the latitude circumference can be expressed in length units or in the number of pixels. Subsequent length units can be selected accordingly and will not be repeated here.

[0071] The quotient obtained by dividing the latitudinal perimeter by the pixel row width represents the degree to which the pixel is stretched. The degree to which the pixel is stretched represents the degree to which the pixel's influence on the panoramic image is amplified. Therefore, the repetition rate can be expressed by the quotient obtained by dividing the latitudinal perimeter by the pixel row width.

[0072] This embodiment can accurately determine the weight of the pixel.

[0073] In certain embodiments, in a third embodiment of the panoramic image processing method of the present disclosure proposed based on the first embodiment of the present disclosure, step S10 includes:

[0074] Step S14, obtaining a panoramic spherical surface corresponding to the panoramic image;

[0075] Step S15, for each pixel, determining the pitch angle of the pixel in the panoramic sphere according to the position parameter; and

[0076] Step S16: Calculate the cosine value corresponding to the absolute value of the pitch angle, and use the cosine value as the weight corresponding to the pixel.

[0077] As shown in Figure 2, the pitch angle is the angle between the horizontal plane and the line connecting the pixel and the center of the sphere. The cosine of the pitch angle is the ratio of the radius of the circle at the pixel's latitude to the radius of the sphere. The radius of the sphere is the radius of the circle corresponding to zero latitude. At zero latitude, the panoramic sphere corresponds one-to-one with each pixel in the panorama. Therefore, the cosine of the pitch angle can represent the degree to which the pixel is stretched and the degree to which the pixel's influence on the panorama is amplified. Therefore, the pixel weight can be derived from the cosine of the pitch angle.

[0078] This embodiment can accurately determine the weight of the pixel.

[0079] In certain embodiments, in a fifth embodiment of the panoramic image processing method of the present disclosure proposed based on the first embodiment of the present disclosure, step S20 includes:

[0080] Step S21, determining the grayscale pixels corresponding to each grayscale value in the panoramic image;

[0081] Step S22, for each grayscale value, taking the sum of the weights of the grayscale pixels as the number of pixels corresponding to the grayscale value; and

[0082] Step S23 , obtaining the weighted histogram by integrating the number of pixels corresponding to each grayscale value.

[0083] When the grayscale value of a pixel is a certain grayscale value, it is a grayscale pixel corresponding to the grayscale value.

[0084] It is understandable that in a general histogram, the number of pixels corresponding to the grayscale value is counted by taking the pixel coefficient as 1. For example, if there are 10 pixels with a grayscale value of 0, then the number of pixels corresponding to the grayscale value of 0 is 10. On this basis, combined with the weights corresponding to the pixels, the number of pixels corresponding to the grayscale value should be the sum of the product of the original coefficient of each pixel and the weight. Since the original coefficient is 1, it can be directly expressed as the sum of the weights of each pixel. It should be noted that in specific application scenarios, if the original coefficient of the pixel is not 1, the number of pixels corresponding to the grayscale value can be set to the sum of the product of the original coefficient of each pixel and the weight.

[0085] In certain embodiments, step S23 comprises:

[0086] Step S231, taking the sum of the weights of all the pixels as the total number of pixels of the panoramic image;

[0087] Step S232, for each grayscale value, calculating a ratio of the pixel data corresponding to the grayscale value to the total number of pixels, and using the ratio as the amount of data corresponding to the grayscale value; and

[0088] Step S233: obtaining the weighted histogram with the data volume as the vertical axis data.

[0089] The method for determining the total number of pixels in this embodiment is the same as the method for determining the number of pixels described above, and will not be repeated here.

[0090] It is understood that the vertical axis of the histogram represents the frequency of the grayscale value, that is, the ratio of the number of pixels corresponding to the grayscale value to the total number of pixels. Because the number of pixels corresponding to the grayscale value needs to be adjusted using weights, if the denominator still uses the total number of pixels in the panoramic image, the sum of the frequencies of the resulting grayscale values ​​will not be 1, making the differentiation between the grayscale values ​​unclear. Therefore, in this embodiment, the total number of pixels is simultaneously adjusted based on the weights so that the sum of the frequencies of the resulting grayscale values ​​is 1, clarifying the differences between the grayscale values.

[0091] In this embodiment, the difference between the grayscale values ​​is clarified to make the subsequent equalization more accurate. In certain embodiments, in the sixth embodiment of the panoramic image processing method of the present disclosure proposed based on the first embodiment of the present disclosure, the step S30 includes:

[0092] Step S31, for each grayscale value in the weighted histogram, obtaining the data volume corresponding to the grayscale value;

[0093] Step S32, determining a target grayscale value of the grayscale value according to the data amount; and

[0094] Step S33 , setting the grayscale value of the pixel corresponding to the grayscale value in the panoramic image to the target grayscale value.

[0095] The data volume is the ratio of the pixel data corresponding to the grayscale value to the total number of pixels. It is understandable that when performing equalization, it is necessary to ensure that the number of pixels corresponding to the grayscale value is constant. When adjusting the grayscale value, it is necessary to adjust the pixels corresponding to the grayscale value synchronously.

[0096] The target grayscale value is the result of grayscale equalization. In some embodiments, the target grayscale value is calculated by the following formula:

[0097] Among them, s k is the target grayscale value corresponding to the kth grayscale value, T(r) is a monotonically increasing function, P r (r j ) is the data volume corresponding to the jth grayscale value, n j is the pixel data corresponding to the j-th grayscale value, and n is the total number of pixels.

[0098] It should be noted that this embodiment only describes an equalization method in one scenario. In actual applications, other equalization algorithms may be selected according to actual application needs.

[0099] This embodiment can implement an equalization operation on a weighted histogram.

[0100] It should be noted that for the aforementioned method embodiments, for simplicity of description, they are all expressed as a series of action combinations, but those skilled in the art should be aware that the present disclosure is not limited by the order of the actions described, because according to the present disclosure, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present disclosure.

[0101] Through the description of the above embodiments, those skilled in the art can clearly understand that the method according to the above embodiment can be implemented by means of software plus the necessary general hardware platform, or of course by hardware, but in many cases the former is a better implementation method. Based on this understanding, the essential part of the technical solution of the present disclosure can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk), including a number of instructions for enabling a terminal device (which can be a mobile phone, computer, server, or network device, etc.) to execute the methods described in each embodiment of the present disclosure.

[0102] The present disclosure also provides a panoramic image processing device configured to implement the above-mentioned panoramic image processing method, the panoramic image processing device comprising:

[0103] A first acquisition module is configured to obtain a position parameter corresponding to each pixel in the panoramic image, and determine a weight of each pixel according to the corresponding position parameter;

[0104] a first generating module configured to generate a weighted histogram corresponding to the panoramic image based on the weight corresponding to each pixel; and

[0105] The first execution module is configured to perform an equalization operation on the weighted histogram.

[0106] The panoramic image processing device can determine the mapping relationship between the pixels in the panoramic image and the panoramic sphere through the pixel position parameters. The pixel weights obtained thereby can reflect the degree of influence of the pixels on the panoramic image. Therefore, the weighted histogram generated based on the weights can avoid the imbalance problem caused by pixel duplication, and can improve the processing effect of histogram equalization in panoramic image application scenarios.

[0107] It should be noted that the first acquisition module in this embodiment can be configured to execute step S10 in the embodiment of the present disclosure, the first generation module in this embodiment can be configured to execute step S20 in the embodiment of the present disclosure, and the first execution module in this embodiment can be configured to execute step S30 in the embodiment of the present disclosure.

[0108] In some embodiments, the first acquisition module comprises:

[0109] a first acquiring unit configured to acquire a panoramic spherical surface corresponding to the panoramic image;

[0110] a first determining unit configured to determine, for each pixel, a first position of the pixel in the panoramic image and a second position of the pixel in the panoramic sphere according to the position parameter; and

[0111] The first calculation unit is configured to calculate a repetition rate of the pixel according to the first position and the second position, and use the repetition rate as a weight of the pixel.

[0112] In certain embodiments, the first computing unit comprises:

[0113] A first determining subunit is configured to determine a pixel row width of a pixel row where the first position is located, and determine a latitude perimeter of a latitude where the second position is located; and

[0114] The first calculation subunit is configured to calculate a quotient of the latitudinal perimeter divided by the pixel row width, and use the quotient as a repetition rate corresponding to the pixel.

[0115] In some embodiments, the first acquisition module comprises:

[0116] a second acquiring unit configured to acquire a panoramic spherical surface corresponding to the panoramic image;

[0117] a second determining unit configured to determine, for each pixel, a pitch angle of the pixel in a panoramic sphere corresponding to the panoramic image; and

[0118] The second calculation unit is configured to calculate a cosine value corresponding to the absolute value of the pitch angle, and use the cosine value as a weight corresponding to the pixel.

[0119] In certain embodiments, the first generation module comprises:

[0120] a third determining unit configured to determine grayscale pixels corresponding to each grayscale value in the panoramic image;

[0121] A first execution unit is configured to, for each grayscale value, use the sum of the weights of the grayscale pixels as the number of pixels corresponding to the grayscale value; and

[0122] The second execution unit is configured to obtain the weighted histogram by integrating the number of pixels corresponding to each grayscale value.

[0123] In some embodiments, the second execution unit includes:

[0124] A first execution subunit is configured to take the sum of the weights of all the pixels as the total number of pixels of the panoramic image;

[0125] a second calculating subunit configured to calculate, for each grayscale value, a ratio of pixel data corresponding to the grayscale value to the total number of pixels, and use the ratio as the amount of data corresponding to the grayscale value; and

[0126] The second execution subunit is configured to obtain the weighted histogram with the data volume as the vertical axis data.

[0127] In some embodiments, the first execution module includes:

[0128] a third acquiring unit configured to acquire, for each grayscale value in the weighted histogram, a data amount corresponding to the grayscale value;

[0129] A fourth determining unit configured to determine a target grayscale value of the grayscale value according to the data amount; and

[0130] The first setting unit is configured to set the grayscale value of the pixel corresponding to the grayscale value in the panoramic image to the target grayscale value.

[0131] It should be noted that the examples and application scenarios implemented by the above modules and corresponding steps are the same, but are not limited to the contents disclosed in the above embodiments. It should be noted that the above modules as part of the device can be implemented by software or hardware, wherein the hardware environment includes a network environment.

[0132] 3 , the electronic device may include, in terms of hardware structure, components such as a communication module 10, a memory 20, and a processor 30. In the electronic device, the processor 30 is connected to the memory 20 and the communication module 10, respectively. The memory 20 stores a computer program, which is simultaneously executed by the processor 30. When the computer program is executed, the panoramic image processing method described in the present disclosure is implemented.

[0133] In certain embodiments, the communication module 10 can be connected to an external communication device via a network. The communication module 10 can receive requests from the external communication device and can also send requests, instructions, and information to the external communication device, which can be other electronic devices, servers, or IoT devices, such as televisions.

[0134] In certain embodiments, the memory 20 may be configured to store software programs and various data. The memory 20 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as obtaining the position parameters corresponding to each pixel in a panoramic image). The data storage area may include a database and may store data or information created based on the use of the system. Furthermore, the memory 20 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0135] In certain embodiments, the processor 30 serves as the control center of the electronic device, connecting the various components of the electronic device using various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 20 and accessing data stored in the memory 20, the processor 30 performs various functions of the electronic device and processes data, thereby providing overall monitoring of the electronic device. The processor 30 may include one or more processing units; alternatively, the processor 30 may integrate an application processor and a modem processor, wherein the application processor primarily processes the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into the processor 30.

[0136] Although not shown in FIG3 , the electronic device may further include a circuit control module configured to be connected to a power source to ensure the normal operation of other components. Those skilled in the art will appreciate that the electronic device structure shown in FIG3 does not limit the electronic device and may include more or fewer components than shown, or combine certain components, or arrange the components differently.

[0137] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. The computer-readable storage medium may be the memory 20 in the electronic device of FIG3 , or may be at least one of a ROM (Read-Only Memory) / RAM (Random Access Memory), a magnetic disk, and an optical disk, and the computer-readable storage medium includes instructions for causing a terminal device having a processor (such as a television, a car, a mobile phone, a computer, a server, a terminal, or a network device) to execute the methods described in various embodiments of the present disclosure.

[0138] In the present disclosure, the terms "first", "second", "third", "fourth" and "fifth" are used for descriptive purposes only and are not to be understood as indicating or implying relative importance. For ordinary technicians in this field, the specific meanings of the above terms in this disclosure can be understood according to specific circumstances.

[0139] In the description of this specification, the description with reference to the terms "one embodiment", "certain embodiments", "example", "specific example", or "certain examples" means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present disclosure. In this specification, the schematic expressions of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine different embodiments or examples described in this specification and features of different embodiments or examples, unless they are mutually inconsistent.

[0140] Although the embodiments of the present disclosure have been shown and described above, the scope of protection of the present disclosure is not limited thereto. It is understood that the above embodiments are exemplary and should not be construed as limiting the present disclosure. A person of ordinary skill in the art may make changes, modifications, and substitutions to the above embodiments within the scope of the present disclosure, and such changes, modifications, and substitutions shall be encompassed within the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure shall be subject to the scope of protection of the claims.

Claims

1. Panoramic image processing method, include: Obtaining position parameters corresponding to each pixel in the panoramic image, and determining the weight of each pixel according to the corresponding position parameters; Generating a weighted histogram corresponding to the panoramic image based on the weights corresponding to the pixels; as well as An equalization operation is performed on the weighted histogram.

2. The panoramic image processing method according to claim 1, wherein the step of determining the weight of each pixel according to the corresponding position parameter include: Acquire a panoramic sphere corresponding to the panoramic image; For each of the pixels, determining a first position of the pixel in the panoramic image and a second position of the pixel in the panoramic sphere according to the position parameter; as well as The repetition rate of the pixel is calculated according to the first position and the second position, and the repetition rate is used as the weight of the pixel.

3. The panoramic image processing method according to claim 2, wherein the step of calculating the repetition rate of the pixel according to the first position and the second position include: Determine a pixel row width of a pixel row where the first position is located, and determine a latitude circumference of a latitude where the second position is located; as well as The quotient of the latitude perimeter divided by the pixel row width is calculated, and the quotient is used as the repetition rate corresponding to the pixel.

4. The panoramic image processing method according to any one of claims 1 to 3, wherein the step of determining the weight of each pixel according to the corresponding position parameter include: Acquire a panoramic sphere corresponding to the panoramic image; For each pixel, the position of the pixel in the panoramic sphere is determined according to the position parameter. The pitch angle in the plane; as well as A cosine value corresponding to the absolute value of the pitch angle is calculated, and the cosine value is used as a weight corresponding to the pixel.

5. The method for processing a panoramic image according to any one of claims 1 to 4, wherein the step of generating a weighted histogram corresponding to the panoramic image based on the weight corresponding to each pixel include: Determining the grayscale pixels corresponding to each grayscale value in the panoramic image; For each grayscale value, the sum of the weights of the grayscale pixels is used as the number of pixels corresponding to the grayscale value; as well as The weighted histogram is obtained by combining the number of pixels corresponding to each of the grayscale values.

6. The panoramic image processing method according to claim 5, wherein the step of obtaining the weighted histogram by synthesizing the number of pixels corresponding to each of the grayscale values include: The sum of the weights of all the pixels is taken as the total number of pixels of the panoramic image; For each of the grayscale values, a ratio of the pixel data corresponding to the grayscale value to the total number of pixels is calculated, and the ratio is used as the data amount corresponding to the grayscale value; and The weighted histogram is obtained by taking the data amount as the vertical axis data.

7. The panoramic image processing method according to any one of claims 1 to 6, wherein the step of performing an equalization operation on the weighted histogram include: For each grayscale value in the weighted histogram, obtaining the data amount corresponding to the grayscale value; Determining a target grayscale value of the grayscale value according to the data amount; as well as The grayscale value of the pixel corresponding to the grayscale value in the panoramic image is set as the target grayscale value.

8. A panoramic image processing device, include: A first acquisition module is configured to acquire a position parameter corresponding to each pixel in the panoramic image, and determine a weight of each pixel according to the corresponding position parameter; A first generating module is configured to generate a weighted histogram corresponding to the panoramic image based on the weights corresponding to the pixels; as well as The first execution module is configured to perform an equalization operation on the weighted histogram.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the computer program, when executed by the processor, implements the panoramic image processing method described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the panoramic image processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Construction method for gray-level information content histogram

    CN101937562A

  • Method and device for performing histogram equalization processing on image

    CN104574326A

  • Panoramic image encoding method and apparatus

    CN106412594A

  • Image enhancement method and device, equipment and storage medium

    CN114648448A

  • Image contrast enhancement method and device

    CN115272090A