RAW Image Size Determination Method, Apparatus and Medium

By determining the brightness difference of adjacent pixel units of the RAW image, the problem of unknown RAW image size is solved, and the correct opening and processing of RAW images is achieved.

CN113822926BActive Publication Date: 2025-07-29KUNSHAN QIUTI PHOTOELECTRIC TECH CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202110838311.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-07-23
Publication Date
2025-07-29
Estimated Expiration
2041-07-23

AI Technical Summary

Technical Problem

In the case of unknown image sensor size, RAW images cannot be opened and processed accurately, and there is a lack of unified file information specifications.

Method used

By acquiring multiple target image widths of the RAW image, determining adjacent pixel units and calculating the overall brightness difference, the target image width with the smallest overall brightness difference is finally determined as the real image width.

Benefits of technology

Accurately determine the size of the RAW image to ensure that the image can be opened and processed correctly.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113822926B_ABST
    Figure CN113822926B_ABST
Patent Text Reader

Abstract

Embodiments of this specification disclose a method, apparatus, and medium for determining the size of a RAW image. The method includes: obtaining a RAW image and multiple target image widths, where the RAW image is a sequence composed of the luminance data of multiple pixel units; for each target image width, determining all adjacent pixel units when the multiple pixel units are arranged according to the target image width; for each target image width, determining the overall luminance difference of the RAW image at the target image width based on all adjacent pixel units at the target image width and the luminance data of each pixel unit; based on the overall luminance difference of the RAW image at each target image width, determining the target image width with the smallest overall luminance difference as the true image width of the RAW image. The above solution can accurately determine the size of the RAW image, so that the RAW image can be successfully opened or processed.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of this specification relate to the field of image processing, and in particular, to a method, device, and medium for determining the size of a RAW image. Background Art

[0002] When using a camera or other device with a camera to take pictures, the image sensor captures optical signals and converts them into digital raw image data, that is, a RAW image. A RAW image is raw data that has not been processed or compressed. For RAW images, there is no unified file information specification. Therefore, when the size of the image sensor that captured the RAW image is unknown, the image cannot be opened and processed. Summary of the Invention

[0003] The embodiments of this specification provide a method, device, and medium for determining the size of a RAW image.

[0004] In a first aspect, the embodiments of this specification provide a method for determining the size of a RAW image, the method including:

[0005] Obtain a RAW image and multiple target image widths, where the RAW image is a sequence composed of the luminance data of multiple pixel units;

[0006] For each target image width, determine all adjacent pixel units of the multiple pixel units when arranged according to the target image width;

[0007] For each target image width, based on all adjacent pixel units under the target image width and the luminance data of each pixel unit, determine the overall luminance difference of the RAW image under the target image width;

[0008] Based on the overall luminance difference of the RAW image under each target image width, determine the target image width with the smallest overall luminance difference as the true image width of the RAW image.

[0009] Optionally, for each target image width, determining all adjacent pixel units of the multiple pixel units when arranged according to the target image width includes:

[0010] For each pixel unit in the RAW image under each target image width, based on the target image width, determine the upper adjacent pixel unit or the lower adjacent pixel unit of each pixel unit.

[0011] Optionally, for each target image width, determining the overall brightness difference of the RAW image at the target image width based on all adjacent pixel units at the target image width and the brightness data of each pixel unit includes:

[0012] For all adjacent pixel units at the target image width, calculating the brightness difference data of each group of adjacent pixel units based on the brightness data of each pixel unit;

[0013] Taking the sum of the brightness difference data of each group of adjacent pixel units as the overall brightness difference at the target image width.

[0014] Optionally, after determining the target image width with the smallest overall brightness difference as the true image width of the RAW image, the method further includes:

[0015] Determining the size of the RAW image;

[0016] Based on the size of the RAW image and the true image width, determining the true image height of the RAW image.

[0017] Optionally, for each target image width, determining all adjacent pixel units when the multiple pixel units are arranged according to the target image width includes:

[0018] Determining a target area in the RAW image;

[0019] For each target image width, determining the adjacent pixel units when the multiple pixel units included in the target area are arranged according to the image width.

[0020] In a second aspect, an embodiment of the present specification provides a RAW image size determination device, and the device includes:

[0021] An acquisition module, configured to acquire a RAW image and multiple target image widths, where the RAW image is a sequence composed of brightness data of multiple pixel units;

[0022] An adjacent pixel unit determination module, configured to, for each target image width, determine all adjacent pixel units when the multiple pixel units are arranged according to the target image width;

[0023] A brightness difference determination module, configured to, for each target image width, determine the overall brightness difference of the RAW image at the target image width based on all adjacent pixel units at the target image width and the brightness data of each pixel unit;

[0024] A width determination module, configured to determine the true image width of the RAW image as the target image width when the overall brightness difference is minimized, based on the overall brightness difference of the RAW image at each target image width.

[0025] Optionally, the adjacent pixel unit determination module is configured to:

[0026] For each pixel unit in the RAW image at each target image width, determine the upper adjacent pixel unit or the lower adjacent pixel unit of each pixel unit based on the target image width.

[0027] Optionally, the brightness difference determination module is configured to:

[0028] For all adjacent pixel units at the target image width, calculate the brightness difference data of each group of adjacent pixel units based on the brightness data of each pixel unit;

[0029] Take the sum of the brightness difference data of each group of adjacent pixel units as the overall brightness difference at the target image width.

[0030] Optionally, the apparatus further includes:

[0031] An image size determination module, configured to determine the size of the RAW image;

[0032] A height determination module, configured to determine the true image height of the RAW image based on the size of the RAW image and the true image width.

[0033] Optionally, the adjacent pixel unit determination module is configured to:

[0034] Determine a target area in the RAW image;

[0035] For each target image width, determine the adjacent pixel units of the multiple pixel units included in the target area when arranged according to the image width.

[0036] In a third aspect, an embodiment of this specification provides a RAW image size determination apparatus, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where the processor executes the steps of the above RAW image size determination method.

[0037] In a fourth aspect, an embodiment of this specification provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, the steps of the method described in any one of the above are implemented.

[0038] The beneficial effects of the embodiments of this specification are as follows:

[0039] In the RAW image size determination method provided by the embodiments of this specification, a RAW image and multiple target image widths are obtained. The RAW image is a sequence composed of the luminance data of multiple pixel units. For each target image width, all adjacent pixel units when the multiple pixel units are arranged according to the target image width are determined. For each target image width, based on all adjacent pixel units under the target image width and the luminance data of each pixel unit, the overall luminance difference of the RAW image under the target image width is determined. And the target image width when the overall luminance difference is the smallest is determined as the true image width of the RAW image. In the above solution, since when the RAW image is opened at the correct width, the image is to some extent ordered and not chaotic, and the difference between most pixels and their adjacent pixels nearby is not large. Therefore, the true image width of the RAW image can be determined by the overall luminance difference of adjacent pixels under different image widths, and the size of the RAW image can be accurately determined, so that the RAW image can be successfully opened or processed. Brief Description of the Drawings

[0040] By reading the following detailed description of the preferred embodiments, various other advantages and benefits will become clear to those of ordinary skill in the art. The drawings are only for the purpose of showing the preferred embodiments and are not considered to be a limitation of this specification. And throughout the drawings, the same reference numerals are used to represent the same components. In the drawings:

[0041] Figure 1 is a flowchart of a RAW image size determination method provided by the embodiments of this specification;

[0042] Figure 2 are images when the RAW image provided by the embodiments of this specification is opened at the true image width and the wrong width;

[0043] Figure 3 is provided by the embodiments of this specification Figure 2 The overall luminance difference change curve of the corresponding RAW image under different target image widths;

[0044] Figure 4 are images when the RAW image provided by the embodiments of this specification is opened at the true image width and the wrong width;

[0045] Figure 5 is provided by the embodiments of this specification Figure 4 The overall luminance difference change curve of the corresponding RAW image under different target image widths;

[0046] Figure 6 is a schematic diagram of a RAW image size determination device provided by the embodiments of this specification. Detailed implementation manners

[0047] In order to better understand the above technical solution, the technical solution of the embodiments of this specification will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific features in the embodiments of this specification and the embodiments are detailed descriptions of the technical solution of the embodiments of this specification, rather than limitations on the technical solution of this specification. Without conflict, the technical features in the embodiments of this specification and the embodiments can be combined with each other.

[0048] The embodiments of this specification provide a method for determining the size of a RAW image. As Figure 1 shown, it is a flowchart of a method for determining the size of a RAW image provided by the embodiments of this specification. The method includes the following steps:

[0049] Step S11: Obtain a RAW image and multiple target image widths, where the RAW image is a sequence composed of the luminance data of multiple pixel units;

[0050] Step S12: For each target image width, determine all adjacent pixel units when the multiple pixel units are arranged according to the target image width;

[0051] Step S13: For each target image width, based on all adjacent pixel units under the target image width and the luminance data of each pixel unit, determine the overall luminance difference of the RAW image under the target image width;

[0052] Step S14: Based on the overall luminance difference of the RAW image under each target image width, determine the target image width with the smallest overall luminance difference as the true image width of the RAW image.

[0053] In the embodiments of this specification, the RAW image is the original data generated by the image sensor during shooting. The number of pixel units included in the RAW image is determined by the number of photosensitive points on the image sensor. For example, there are 3 million photosensitive points in the image sensor, and each photosensitive point corresponds to a pixel unit, so the RAW image contains 3 million pixel units. In fact, the true size of the RAW image is also determined by the size of the image sensor. For example, if the photosensitive dot matrix of the image sensor is 1280*720, then the true size of the RAW image should also be 1280*720. However, since the RAW image is a sequence composed of the luminance data of a group of pixel units and there is no unified file information specification, it is impossible to know the true size of the RAW image without knowing the size of the image sensor.

[0054] In the embodiments of this specification, in order to determine the size of a RAW image, the RAW image and multiple target image widths are obtained through step S11. Among them, the RAW image can be any image with an unknown size to be displayed or processed, and the multiple target image widths can be multiple predicted widths of the RAW image.

[0055] In the specific implementation process, the multiple target image widths can be determined in various ways. For example, the multiple target image widths can be multiple preset widths, or can be multiple randomly generated widths. Taking the preset image widths as an example, the currently commonly used image widths can be selected as the target image widths. For example, the target image width can be 720 pixels, 1080 pixels, 1024 pixels, etc. Taking the randomly generated image widths as an example, an image width range can be randomly selected, such as 600 - 2000 pixels, 500 - 3000 pixels, etc., and each width included in this range is used as a target image width. The multiple target image widths can also be all possible widths of the RAW image.

[0056] In order to determine the accurate width of the RAW image among the multiple target image widths, in the embodiments of this specification, the RAW image is processed through step S12, that is: for each target image width, the adjacent pixel units of the multiple pixel units in the RAW image when arranged according to this target image width are determined.

[0057] It should be noted that since the photos taken by an image sensor are usually macroscopic or microscopic portrayals of the real scene, and most areas of the real scene have similar brightness or colors, such as desktops, walls, the sky, patterns, etc., the image content is, to a certain extent, ordered rather than chaotic. In the correctly opened image, most pixels do not differ much from their adjacent pixels, rather than each pixel differing greatly from the surrounding adjacent data. Based on this, in the embodiments of this specification, for each target image width, the multiple pixel units of the RAW image are sorted according to this target image width, and the adjacent pixel units in the RAW image are determined. The adjacent pixel units can be the pixel units adjacent vertically, or the pixel units adjacent horizontally, or the pixel units adjacent to the upper left, lower left, upper right, and lower right of each pixel unit.

[0058] Specifically, when the width of the target image is different, the arrangement of pixel units in the RAW image will also change. For example, the RAW image includes 300,000 pixel units. Taking the vertically adjacent pixels as an example, when the width of the target image is 1000 pixels, the 1st pixel unit in the sequence and the 10001st pixel unit are vertically adjacent pixels; when the width of the target image is 1100 pixels, the 1st pixel unit in the sequence and the 1101st pixel unit are vertically adjacent pixels. It can be seen that for different widths of the target image, the pixel units adjacent to each pixel unit will also change.

[0059] After determining all adjacent pixels for each target image width, the overall brightness difference of the RAW image for each target image width is determined through step S13.

[0060] As described above, in the RAW image at the true image width, the brightness data of adjacent pixel units are relatively close. For example, in an image that includes a sky area, for each pixel unit in the sky area, the brightness difference from adjacent pixel units is small. If the RAW image is opened at an incorrect image width, the correct sky area cannot be displayed, that is, the displayed image is messy and has no pattern. Therefore, in this case, the brightness difference between adjacent pixel units is large. In step S13, for the adjacent pixel units for each target image width, the brightness difference between adjacent pixel units is calculated to determine the overall brightness difference of the RAW image for each target image width.

[0061] Through step S14, the overall brightness differences for each target image width are compared to determine the target image width with the smallest overall brightness difference, and this target image width is used as the true image width of the RAW image.

[0062] In the embodiments of this specification, when determining all adjacent pixel units for each target image width, it can be determined in the following manner: for each pixel unit in the RAW image for each target image width, based on this target image width, the upper adjacent pixel unit or the lower adjacent pixel unit of each pixel unit is determined.

[0063] Specifically, taking a certain target image width W1 as an example, if the RAW image arranges the sequence of pixel units according to W1, the positions of vertically adjacent pixel units differ by W1. When determining the adjacent pixel units of a certain pixel unit, the upper adjacent pixel unit of this pixel unit can be determined, or the lower adjacent pixel unit of this pixel unit can be determined.

[0064] In the specific implementation process, if the adjacent pixel units above each pixel unit are determined, after the RAW image is arranged into a pixel unit array, the pixel units in the first row do not have adjacent pixel units above. That is, the 1st to W1th pixel units in the sequence do not need to calculate the adjacent pixel units above, and the calculation of the adjacent pixel units above starts from the (W1 + 1)th pixel unit. The obtained results are as follows: the (W1 + 1)th pixel unit in the sequence and the 1st pixel unit are adjacent pixel units to each other, the (W1 + 2)th pixel unit in the sequence and the 2nd pixel unit are adjacent pixel units to each other... Through the above method, the adjacent pixel units above each pixel unit in the RAW image are determined.

[0065] If the adjacent pixel units below each pixel unit are determined, after the RAW image is arranged into a pixel unit array, the pixel units in the last row do not have adjacent pixel units below. If the RAW image contains N pixel units, then the (N - W1 + 1)th to Nth pixel units in the sequence do not need to determine the adjacent pixel units below, and only the adjacent pixel units below the 1st pixel unit to the (N - W1)th pixel unit need to be determined. The obtained results are as follows: the 1st pixel unit and the (W1 + 1)th pixel unit are adjacent pixel units to each other, the 2nd pixel unit and the (W1 + 2)th pixel unit are adjacent pixel units to each other... Through the above method, the adjacent pixel units below each pixel unit in the RAW image are determined.

[0066] Of course, in addition to determining the adjacent pixel units above and below each pixel unit in the RAW image, it is also possible to determine the adjacent pixel units on the left and right, the adjacent pixel units in the upper left, the adjacent pixel units in the upper right, etc. in the RAW image, which are not limited here.

[0067] In the embodiments of this specification, when determining the overall brightness difference at each target image width, it can be determined by the following method: for all adjacent pixels at this target image width, based on the brightness data of each pixel unit, calculate the brightness difference data of each group of adjacent pixel units; take the sum of the brightness difference data of each group of adjacent pixel units as the overall brightness difference at this target image width.

[0068] Specifically, for each pixel unit in the RAW image, if the determined adjacent pixel is the upper adjacent pixel unit of each pixel unit, then the pixel unit and its upper adjacent pixel unit form a group of adjacent pixel units. If, for each pixel unit, the determined adjacent pixel unit is the left adjacent pixel unit of the pixel unit, then the pixel unit and its left adjacent pixel unit form a group of adjacent pixel units. If, for each pixel unit, the determined adjacent pixel units are the upper adjacent pixel unit, lower adjacent pixel unit, left adjacent pixel unit, right adjacent pixel unit, upper left adjacent pixel unit, lower left adjacent pixel unit, upper right adjacent pixel unit, and lower right adjacent pixel unit of the pixel unit, then the pixel unit and its surrounding 8 adjacent pixel units form a group of adjacent pixel units.

[0069] For each group of adjacent pixel units, calculate the luminance difference data of the group. For example, if a group of adjacent pixel units includes pixel unit A and its upper adjacent pixel unit B, when calculating the luminance difference data, the absolute value of the difference between the luminance data of pixel unit A and pixel unit B can be taken as the luminance difference data of this group of adjacent pixel units. Then, sum up the luminance difference data of each group of adjacent pixel units to obtain the overall luminance difference under the width of the target image.

[0070] For another example, if a group of adjacent pixels includes pixel unit a and its upper adjacent, lower adjacent, left adjacent, right adjacent, upper left adjacent, lower left adjacent, upper right adjacent, and lower right adjacent pixel units, based on the luminance data of each pixel unit, the absolute value of the difference in luminance data between pixel unit a and its upper adjacent pixel unit, the absolute value of the difference in luminance data between pixel unit a and its lower adjacent pixel unit... the absolute value of the difference in luminance data between pixel unit a and its lower right adjacent pixel unit can be calculated respectively, and the 8 calculated results are added together as the luminance difference data of this group of adjacent pixels. Then, sum up the luminance difference data of each group of adjacent pixel units to obtain the overall luminance difference under the width of the target image.

[0071] Furthermore, since the adjacent pixel differences are large when it is chaotic, that is, the overall luminance difference is large, and the adjacent pixel differences are small when it is orderly, that is, the overall luminance difference is small, therefore, the width of the target image with the smallest overall luminance difference is used as the final true image width.

[0072] After obtaining the true image width, the method in the embodiments of this specification further includes: determining the size of the RAW image; and determining the true image height of the RAW image based on the size of the RAW image and the true image width.

[0073] Specifically, the size of the RAW image can be the total number of pixel units included in the RAW image. By dividing the size of the RAW image by the width of the real image, the height of the real image can be obtained.

[0074] In the embodiments of this specification, in order to reduce the amount of calculation and save computing resources, step S12 can be implemented in the following manner: determine a target area in the RAW image; for each target image width, determine all the pixel units included in the target area when arranged according to the target image width.

[0075] Specifically, since calculating the adjacent pixels of all pixel units in the RAW image requires a large amount of calculation, in order to reduce the amount of calculation, in the embodiments of this specification, the pixel units in a certain area of the RAW image can be processed. The target area can be any area in the RAW image. For example, a certain segment of the sequence can be determined as the target area in the sequence. For each pixel unit in the target area, determine the adjacent pixel unit of the pixel unit, and determine the luminance difference data of all adjacent pixel units corresponding to the target area under each target image width, so as to obtain the overall area luminance difference of the target area under each image width. Further, the target image width with the smallest overall area luminance difference is used as the final real image width. The process of determining the real image width based on the target area is the same as the process of determining the real image width based on the entire RAW image, and will not be elaborated here.

[0076] For a better understanding of the RAW image size determination method provided in the embodiments of this specification, please refer to Figure 2 and Figure 3 , Figure 2 In the first figure of, the normal image is opened at the real image width, and the second and third figures are both images opened at incorrect image widths. Figure 3 is Figure 2 the corresponding RAW image, and the curve of the overall luminance difference change at different target image widths, Figure 3 in, the abscissa is the target image width, and the ordinate is the overall luminance difference. As can be seen from Figure 3 , when the target image width is 4000 pixels, the corresponding overall luminance difference is the smallest, and 4000 pixels is exactly the width of the first figure, that is, the real image width.

[0077] Please refer to Figure 4 and Figure 5 , Figure 4 In the first figure of, the normal image is opened at the real image width, and the second and third figures are both images opened at incorrect image widths. Figure 5 is Figure 4The overall brightness difference change curve of the corresponding RAW image under different target image widths Figure 5 In Figure 5 , the abscissa is the target image width, and the ordinate is the overall brightness difference. As can be seen from Figure 5 Figure 5 , when the target image width is 4208 pixels, the corresponding overall brightness difference is the smallest, and 4208 pixels is exactly the width of the first figure, that is, the true image width.

[0078] In summary, in the solution of the embodiments of this specification, the final true image width is determined by calculating the overall brightness difference between adjacent pixels under different target image widths. Considering that the difference between adjacent pixels in the correctly opened image content is small, therefore, the image width corresponding to the smallest overall brightness difference is used as the true image width, which can accurately determine the correct size of the RAW image for displaying and other processing of the RAW image.

[0079] Based on the same inventive concept, the embodiments of this specification provide a RAW image size determination device, as shown in Figure 6 Figure 6 . The device includes:

[0080] An acquisition module 51, configured to acquire a RAW image and a plurality of target image widths, where the RAW image is a sequence composed of brightness data of a plurality of pixel units;

[0081] An adjacent pixel unit determination module 52, configured to, for each target image width, determine all adjacent pixel units of the plurality of pixel units when arranged according to the target image width;

[0082] A brightness difference determination module 53, configured to, for each target image width, determine the overall brightness difference of the RAW image under the target image width based on all adjacent pixel units under the target image width and the brightness data of each pixel unit;

[0083] A width determination module 54, configured to determine the target image width with the smallest overall brightness difference as the true image width of the RAW image based on the overall brightness difference of the RAW image under each target image width.

[0084] Optionally, the adjacent pixel unit determination module 52 is configured to:

[0085] For each pixel unit in the RAW image under each target image width, based on the target image width, determine the upper adjacent pixel unit or the lower adjacent pixel unit of each pixel unit.

[0086] Optionally, the brightness difference determination module 53 is configured to:

[0087] For all adjacent pixel units at the width of the target image, based on the luminance data of each pixel unit, calculate the luminance difference data of each group of adjacent pixel units;

[0088] Take the sum of the luminance difference data of each group of adjacent pixel units as the overall luminance difference at the width of the target image.

[0089] Optionally, the device further includes:

[0090] An image size determination module, configured to determine the size of the RAW image;

[0091] A height determination module, configured to determine the true image height of the RAW image based on the size of the RAW image and the true image width.

[0092] Optionally, the adjacent pixel unit determination module 52 is configured to:

[0093] Determine a target area in the RAW image;

[0094] For each target image width, determine the adjacent pixel units of the multiple pixel units included in the target area when arranged according to the image width.

[0095] Regarding the above device, the specific functions of each module have been described in detail in the embodiments of the RAW image size determination method provided in this specification, and will not be elaborated here.

[0096] Based on the same inventive concept as the RAW image size determination method in the foregoing embodiments, an embodiment of this specification further provides a RAW image size determination device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the RAW image size determination method described above are implemented.

[0097] Based on the inventive concept of the RAW image size determination method in the foregoing embodiments, an embodiment of this specification further provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, the steps of any of the RAW image size determination methods described above are implemented.

[0098] This specification is described with reference to the flowcharts and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the specification. It should be understood that each flow and / or block in the flowchart and / or block diagram, and combinations of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing device to produce a machine, such that the instructions executed by the processor of the computer or other programmable data processing device produce a device for implementing the functions specified in one or more flows Figure 1 one or more flows and / or blocks Figure 1 or one or more blocks.

[0099] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a particular manner, such that the instructions stored in the computer-readable memory produce a manufacture including instruction means that implement the functions specified in one or more flows Figure 1 one or more flows and / or blocks Figure 1 or one or more blocks.

[0100] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, so that the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one or more flows Figure 1 one or more flows and / or blocks Figure 1 or one or more blocks.

[0101] Although the preferred embodiments of the specification have been described, additional changes and modifications can be made by those skilled in the art once they learn of the basic creative concept. Therefore, the appended claims are intended to be construed to include the preferred embodiments and all changes and modifications that fall within the scope of the specification.

[0102] Obviously, those skilled in the art can make various changes and modifications to the specification without departing from the spirit and scope of the specification. Thus, if these modifications and variations of the specification fall within the scope of the claims of the specification and their equivalent technologies, the specification is also intended to include these modifications and variations.

Claims

1. A method for determining the size of a RAW image, characterized in that, The method includes: Obtaining a RAW image and multiple target image widths, where the RAW image is a sequence composed of luminance data of multiple pixel units; For each target image width, determining all adjacent pixel units of the multiple pixel units when arranged according to the target image width; For each target image width, based on all adjacent pixel units under the target image width and the luminance data of each pixel unit, determining the overall luminance difference of the RAW image under the target image width; Based on the overall luminance difference of the RAW image under each target image width, determining the target image width with the smallest overall luminance difference as the true image width of the RAW image, so as to open or process the RAW image based on the true image width.

2. The method according to claim 1, wherein The step of, for each target image width, determining all adjacent pixel units of the multiple pixel units when arranged according to the target image width includes: For each pixel unit in the RAW image under each target image width, based on the target image width, determining the upper adjacent pixel unit or the lower adjacent pixel unit of each pixel unit.

3. The method according to claim 1, wherein The step of, for each target image width, based on all adjacent pixel units under the target image width and the luminance data of each pixel unit, determining the overall luminance difference of the RAW image under the target image width includes: For all adjacent pixel units under the target image width, based on the luminance data of each pixel unit, calculating the luminance difference data of each group of adjacent pixel units; Taking the sum of the luminance difference data of each group of adjacent pixel units as the overall luminance difference under the target image width.

4. The method according to claim 1, wherein After determining the target image width with the smallest overall luminance difference as the true image width of the RAW image, the method further includes: Determining the size of the RAW image; Based on the size of the RAW image and the true image width, determining the true image height of the RAW image.

5. The method according to claim 1, characterized in that The step of, for each target image width, determining all adjacent pixel units of the multiple pixel units when arranged according to the target image width includes: Determining a target area in the RAW image; For each target image width, determining the adjacent pixel units of the multiple pixel units included in the target area when arranged according to the image width.

6. A RAW image size determination device, characterized in that, The device includes: An acquisition module, configured to acquire a RAW image and multiple target image widths, where the RAW image is a sequence composed of luminance data of multiple pixel units; An adjacent pixel unit determination module, configured to, for each target image width, determine all adjacent pixel units of the multiple pixel units when arranged according to the target image width; A luminance difference determination module, configured to, for each target image width, based on all adjacent pixel units under the target image width and the luminance data of each pixel unit, determine the overall luminance difference of the RAW image under the target image width; A width determination module, configured to determine, based on the overall brightness difference of the RAW image at each target image width, the target image width with the smallest overall brightness difference as the true image width of the RAW image, so as to open or process the RAW image based on the true image width.

7. The device according to claim 6, characterized in that The adjacent pixel unit determination module is configured to: For each pixel unit in the RAW image at each target image width, determine the upper adjacent pixel unit or the lower adjacent pixel unit of each pixel unit based on the target image width.

8. The device according to claim 6, characterized in that, The brightness difference determination module is configured to: For all adjacent pixel units at the target image width, calculate the brightness difference data of each group of adjacent pixel units based on the brightness data of each pixel unit; Use the sum of the brightness difference data of each group of adjacent pixel units as the overall brightness difference at the target image width.

9. A RAW image size determination device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the steps of the method according to any one of claims 1-5 are implemented.

10. A computer storage medium, characterized in that, A computer program is stored thereon, and when the program is executed by the processor, the steps of the method according to any one of claims 1-5 are implemented.

Citation Information

Patent Citations

  • Method for obtaining 3D imaging image from single 2D image

    CN103384340A

  • Wide-screen film display mode identifying method and device

    CN104167187A

  • Image sharpness measuring method combined with visual analysis

    CN105118060A