Image quality acquisition method, device and electronic equipment
By performing structural texture decomposition on panoramic images, scores for viewpoint transformation distortion, edge continuity distortion, and bleed distortion are obtained, solving the problem that existing technologies cannot evaluate the quality of panoramic images and achieving accurate quality assessment of panoramic images.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- VIVO MOBILE COMM CO LTD
- Filing Date
- 2023-05-19
- Publication Date
- 2026-07-03
AI Technical Summary
Existing image quality assessment methods cannot effectively evaluate the quality of panoramic images, especially problems such as viewpoint transformation distortion, edge continuity, and color bleeding distortion.
By acquiring N first images to be stitched together, structural texture decomposition is performed to obtain viewpoint transformation distortion score, edge continuity distortion score, and bleed distortion score. These distortion scores are then combined to calculate the quality score of the panoramic image.
It enables accurate quality evaluation of panoramic images, assessing issues such as viewpoint distortion, edge breakage, and color distortion, and provides perceptual quality assessment for panoramic images.
Smart Images

Figure CN116596818B_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of image processing technology, specifically relating to an image quality acquisition method, apparatus, and electronic device. Background Technology
[0002] Capturing panoramic images is a crucial technology for mobile phone cameras. However, due to limitations in camera hardware, the field of view of a captured image is fixed, making it impossible to encompass the entire scene in a single shot. Current methods for capturing panoramic images involve continuously shooting multiple frames along a specific direction, performing simple processing, and then stitching them together to obtain a single panoramic image. Existing quality assessment methods primarily evaluate general image distortions such as blur, noise, and compression artifacts; these methods are insufficient for evaluating the quality of panoramic images. Summary of the Invention
[0003] The purpose of this application is to provide an image quality acquisition method, apparatus, and electronic device that can solve the problem that the prior art cannot acquire the quality of panoramic images.
[0004] To solve the above-mentioned technical problems, this application is implemented as follows:
[0005] In a first aspect, embodiments of this application provide an image quality acquisition method, including:
[0006] Obtain N first images to be stitched together, and obtain the second image after stitching together the N first images, where N is an integer greater than 1;
[0007] Perform structural texture decomposition on the second image to obtain a structural image;
[0008] Based on the structural image and the N first images, at least one of the following is obtained for the second image: viewpoint transformation distortion score, edge continuity distortion score, and bleed distortion score. The viewpoint transformation distortion score is used to characterize the degree of viewpoint distortion of the second image obtained after the N first images are transformed. The edge continuity distortion score is used to characterize the continuity at the stitching point of the N first images. The bleed distortion score is used to characterize the degree of color distortion in the overlapping area after the N first images are stitched together.
[0009] The quality score of the second image is obtained based on at least one of the viewpoint transformation distortion score, the edge continuity distortion score, and the bleed distortion score.
[0010] Secondly, embodiments of this application provide an image quality acquisition device, comprising:
[0011] The first acquisition module is used to acquire N first images to be stitched together, and to acquire a second image after stitching together the N first images, where N is an integer greater than 1;
[0012] The first processing module is used to perform structural texture decomposition on the second image to obtain a structural image;
[0013] The second processing module is used to obtain at least one of the following in the second image based on the structure image and the N first images: a viewpoint transformation distortion score, an edge continuity distortion score, and a bleed distortion score. The viewpoint transformation distortion score is used to characterize the degree of viewpoint distortion of the second image obtained after the N first images are transformed. The edge continuity distortion score is used to characterize the continuity at the stitching point of the N first images. The bleed distortion score is used to characterize the degree of color distortion in the overlapping area after the N first images are stitched together.
[0014] The third processing module is used to obtain the quality score of the second image based on at least one of the viewpoint transformation distortion score, the edge continuity distortion score, and the bleed distortion score.
[0015] Thirdly, embodiments of this application provide an electronic device including a processor and a memory, the memory storing programs or instructions executable on the processor, the programs or instructions, when executed by the processor, implementing the steps of the method described in the first aspect.
[0016] Fourthly, embodiments of this application provide a readable storage medium on which a program or instructions are stored, which, when executed by a processor, implement the steps of the method described in the first aspect.
[0017] Fifthly, embodiments of this application provide a chip, the chip including a processor and a communication interface, the communication interface being coupled to the processor, the processor being used to run programs or instructions to implement the method as described in the first aspect.
[0018] In a sixth aspect, embodiments of this application provide a computer program product stored in a storage medium, which is executed by at least one processor to implement the method described in the first aspect.
[0019] In this embodiment, by acquiring N first images to be stitched and a second image resulting from the stitching of the N first images, structural texture decomposition is performed on the second image to obtain a structural image, thereby obtaining the edge information of the second image. Furthermore, based on the structural image and the N first images, at least one of the following is obtained: a viewpoint transformation distortion score, an edge continuity distortion score, and a bleed distortion score. The viewpoint transformation distortion score characterizes the degree of viewpoint distortion of the second image obtained after viewpoint transformation of the N first images; this score indicates whether the stitched second image is distorted and the degree of distortion. The edge continuity distortion score characterizes the continuity at the stitching point of the N first images; this score indicates whether the edges of the stitched second image are broken and the degree of breakage. The bleed distortion score characterizes the degree of color distortion in the overlapping area after stitching the N first images; this score indicates whether there is a color difference between the images before and after stitching and the magnitude of the color difference. The quality score of the second image is obtained based on at least one of the perspective transformation distortion score, the edge continuity distortion score, and the bleed distortion score. That is, the image quality of the second image is determined by judging at least one of the following: whether the stitched second image is distorted and the degree of distortion, whether the edges of the second image are broken and the degree of breakage, and whether there is a color difference between the images before and after stitching and the size of the color difference. Attached Figure Description
[0020] Figure 1 This is one of the flowcharts illustrating the image quality acquisition method provided in the embodiments of this application;
[0021] Figure 2 This is a schematic diagram of the stitching of the second image provided in the embodiments of this application;
[0022] Figure 3 This is a second schematic flowchart of the image quality acquisition method provided in the embodiments of this application;
[0023] Figure 4 This is a schematic diagram of the second structural edge set provided in an embodiment of this application;
[0024] Figure 5 This is a schematic diagram of the structure of an image quality acquisition device provided in an embodiment of this application;
[0025] Figure 6 This is a structural block diagram of an electronic device provided in an embodiment of this application;
[0026] Figure 7 This is a structural block diagram of another electronic device provided in the embodiments of this application. Detailed Implementation
[0027] The technical solutions of the embodiments of this application will be clearly described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application are within the scope of protection of this application.
[0028] The terms "first," "second," etc., used in the specification and claims of this application are used to distinguish similar objects and not to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that embodiments of this application can be implemented in orders other than those illustrated or described herein, and the objects distinguished by "first," "second," etc., are generally of the same class and the number of objects is not limited; for example, a first object can be one or more. Furthermore, in the specification and claims, "and / or" indicates at least one of the connected objects, and the character " / " generally indicates that the preceding and following objects are in an "or" relationship.
[0029] The image quality acquisition method provided in this application will be described in detail below with reference to the accompanying drawings, through specific embodiments and application scenarios.
[0030] like Figure 1 As shown in the figure, this application provides an image quality acquisition method, which may specifically include the following steps:
[0031] Step 101: Obtain N first images to be stitched together, and obtain the second image after stitching together the N first images, where N is an integer greater than 1.
[0032] Specifically, N first images to be stitched are obtained, and the N first images are stitched together to obtain a stitched second image, which can be a stitched panoramic image.
[0033] Step 102: Perform structural texture decomposition on the second image to obtain a structural image.
[0034] Specifically, the stitched second image is decomposed into structure and texture, which means that the second image can be decomposed into two parts: a structure image and a texture image. The structure image reflects the overall framework of the second image, including descriptive information such as the structural edges of the second image, while the texture image reflects the details in the framework of the second image.
[0035] Step 103: Based on the structural image and the N first images, obtain at least one of the following: viewpoint transformation distortion score, edge continuity distortion score, and bleed distortion score of the second image. The viewpoint transformation distortion score is used to characterize the degree of viewpoint distortion of the second image obtained after the N first images are transformed. The edge continuity distortion score is used to characterize the continuity at the stitching point of the N first images. The bleed distortion score is used to characterize the degree of color distortion in the overlapping area after the N first images are stitched together.
[0036] Specifically, such as Figure 2 As shown, there are N first images (images I1, I2…I…). N Due to differences in imaging distance and angle, the viewing angles after imaging will vary. To make the stitched second image more natural, the N first images need to be scaled and / or rotated to align their viewing angles before stitching. If the viewing angle rotation is inappropriate, the stitched second image will show objects protruding outwards. Therefore, based on the structural image and the N first images, a viewing angle transformation distortion score is obtained. This score represents the degree of viewing angle distortion when stitching the N first images into the second image, i.e., the degree of object protrusion in the second image caused by the viewing angle transformation. Thus, the degree of visual convexity is measured by measuring the curvature change of the image structural edges before and after stitching.
[0037] Furthermore, when stitching together N first images, inaccurate keypoint matching at the stitching point can easily lead to broken edges at the stitching boundary, severely affecting the visual quality of the stitched image. Therefore, based on the structural image and the N first images, an edge continuity distortion score is obtained. This score represents the degree of continuity at the stitching point after stitching the N first images, i.e., the degree of edge continuity at the stitching point caused by image stitching. Thus, the perceptual quality of the stitching is measured by quantifying the edge continuity of the structural edges at the image stitching point.
[0038] Furthermore, N first images are stitched together. To make the stitching more natural, the stitched two first images undergo a fusion process in the stitching area. If the fusion is not done properly, color shift will occur, leading to color bleeding and affecting the perceptual quality of the second image. Therefore, based on the structural image and the N first images, a color bleeding distortion score is obtained. This score represents the degree of color distortion in the overlapping area after stitching the N first images, that is, the degree of color shift in the overlapping area when stitching two first images together.
[0039] Step 104: Obtain the quality score of the second image based on at least one of the viewpoint transformation distortion score, the edge continuity distortion score, and the bleed distortion score.
[0040] Specifically, based on at least one of the obtained viewpoint transformation distortion score, edge continuity distortion score, and bleed distortion score, a score characterizing the perceptual quality of the stitched second image is obtained, i.e., the quality score of the second image. This quality score can be used to measure the perceptual quality of the second image; that is, the image quality evaluation result of the second image can be obtained through the quality score.
[0041] In the above embodiments of this application, by acquiring N first images to be stitched and a second image obtained by stitching the N first images, structural texture decomposition is performed on the second image to obtain a structural image, thereby obtaining the edge information of the second image. Furthermore, based on the structural image and the N first images, at least one of the following is obtained: a viewpoint transformation distortion score, an edge continuity distortion score, and a bleed distortion score. The viewpoint transformation distortion score characterizes the degree of viewpoint distortion of the second image obtained after viewpoint transformation of the N first images; this score indicates whether the stitched second image is distorted and the degree of distortion. The edge continuity distortion score characterizes the continuity at the stitching point of the N first images; this score indicates whether the edges of the stitched second image are broken and the degree of breakage. The bleed distortion score characterizes the degree of color distortion in the overlapping area after stitching the N first images; this score indicates whether there is a color difference between the images before and after stitching and the magnitude of the color difference. The quality score of the second image is obtained based on at least one of the perspective transformation distortion score, the edge continuity distortion score, and the bleed distortion score. That is, the image quality of the second image is determined by judging at least one of the following: whether the stitched second image is distorted and the degree of distortion, whether the edges of the second image are broken and the degree of breakage, and whether there is a color difference between the images before and after stitching and the magnitude of the color difference, thereby obtaining an accurate evaluation result.
[0042] As an optional embodiment, step 103, based on the structural image and the N first images, obtains the viewpoint transformation distortion score of the second image, specifically including:
[0043] Edge detection is performed on the structural image to obtain a first set of structural edges. The first set of structural edges includes M first subsets, each of which represents one of the structural edges in the second image, where M is an integer greater than 0.
[0044] Each structural edge in the first set of structural edges is matched and detected with the N first images to obtain a second set of structural edges. The second set of structural edges includes M second subsets, which represent the structural edges in the N first images that match the first subset.
[0045] Obtain the first curvature of each first subset in the first set of structural edges and the second curvature of each second subset in the second set of structural edges;
[0046] Based on M of the first curvature and M of the second curvature, calculate the viewpoint transformation distortion score of the second image. Specifically, as follows... Figure 3 As shown, after acquiring the structural image of the second image, viewpoint transformation distortion calculation is performed on the structural image. Specifically, the steps are as follows: Edge detection is performed on the structural image using methods such as the Canny edge detection operator. This reveals that the structural image includes M structural edges (i.e., there are M image edges in the structural image). Each structural edge is a first subset, thus, the M structural edges correspond to M first subsets. The M first subsets are combined into a set, namely the first structural edge set. If the first structural edge set is: {B} c1 B c2 …B cM}, then B c1 B represents the first subset corresponding to the first structural edge. c2 B represents the first subset corresponding to the edge of the second structure, and so on. cM This represents the first subset corresponding to the Mth structural edge.
[0047] Each structural edge in the first set of structural edges is matched with N first images using methods such as the Scale Invariant Feature Transform (SIFT) operator to obtain the second set of structural edges. This involves matching the first structural edge with N first images to obtain the structural edges that match the first structural edge in the N first images. The method then yields the structural edges corresponding to the first structural edge in the N first images, forming the second subset corresponding to the first structural edge. This process is repeated to obtain M second subsets corresponding to M structural edges. These M second subsets constitute the second set of structural edges, representing the set of structural edges before the viewpoint transformation. If the second set of structural edges is: {B1, B2…B…} M}, then B1 represents the second subset corresponding to the first structural edge, B2 represents the second subset corresponding to the second structural edge, and so on, B M This represents the second subset corresponding to the Mth structural edge.
[0048] Furthermore, after obtaining the first and second structural edge sets, the curvature of each first subset in the first structural edge set (i.e., the first curvature) is calculated, and the curvature of each second subset in the second structural edge set (i.e., the second curvature) is calculated, thus obtaining M first curvatures and M second curvatures. The viewpoint transformation distortion score of the second image is calculated using the M first curvatures and M second curvatures, thereby revealing the degree of image distortion caused by stitching together N first images with different viewpoints to form the second image.
[0049] As an optional embodiment, the first subset represents the set of pixels of one of the structural edges in the second image, and the second subset represents the set of pixels of the structural edges in the N first images that match the first subset.
[0050] Specifically, each structural edge includes multiple pixels, and these pixels combine to form a set of pixels, i.e., the first subset. Therefore, M structural edges correspond to M sets of pixels, i.e., M first subsets. The M first subsets combine to form a set, i.e., the first set of structural edges.
[0051] By using methods such as the SIFT operator, each pixel in the first structural edge set is matched and detected with N pixels in the first image to obtain the second structural edge set. That is, one pixel in the first subset corresponding to the first structural edge is matched and detected with N pixels in the first image to obtain matching pixels in the N first images. The matching pixels of all pixels in the first subset corresponding to the first structural edge are obtained by the above method. The matching pixels of all pixels in the first subset corresponding to the first structural edge are combined into a set, which is the second subset corresponding to the first structural edge. The above method is used to obtain M second subsets corresponding to M structural edges. The M second subsets form the second structural edge set, which represents the set of pixels of the structural edge before the viewpoint transformation.
[0052] As an optional embodiment, the viewpoint transformation distortion fraction of the second image can be calculated using the following formula:
[0053]
[0054] Where q1 represents the viewpoint transformation distortion fraction;
[0055] M represents the number of the first subset or the number of the second subset;
[0056] i represents the i-th first subset in the first structural edge set, or the i-th second subset in the second structural edge set, where i is greater than 0 and less than or equal to M;
[0057] r ci Denotes the first curvature of the i-th first subset;
[0058] r i Let represent the second curvature of the i-th second subset.
[0059] Specifically, calculate the first curvature corresponding to each first subset, obtaining M first curvatures, and calculate the second curvature corresponding to each second subset, obtaining M second curvatures. For the i-th first subset in the M first subsets and the i-th second subset in the M second subsets, calculate the sum of the squares of the first curvature corresponding to the i-th first subset and the squares of the second curvature corresponding to the i-th second subset, obtaining a first value. Then, calculate twice the product of the first curvature corresponding to the i-th first subset and the second curvature corresponding to the i-th second subset, obtaining a second value; calculate the quotient of the first value divided by the second value, obtaining a third value corresponding to the i-th first subset (or the i-th second subset). Calculate the third value corresponding to each first subset using the above method, obtaining M third values. Add the M third values to obtain a fourth value. Divide the fourth value by M, which is the viewpoint transformation distortion score of the second image.
[0060] As an optional embodiment, step 103, based on the structural image and the N first images, obtains the edge continuity distortion score of the second image, specifically including:
[0061] Edge detection is performed on the structural image to obtain a first set of structural edges. The first set of structural edges includes M first subsets, each of which represents one of the structural edges in the second image, where M is an integer greater than 0.
[0062] Each structural edge in the first set of structural edges is matched and detected with the N first images to obtain a second set of structural edges. The second set of structural edges includes M second subsets, which represent the structural edges in the N first images that match the first subset.
[0063] Pixels that are not located at the image edge in the second structural edge set are removed to obtain a third structural edge set, which includes P third subsets, where P is an integer greater than 0 and less than or equal to M;
[0064] Based on the third structural edge set, the first structural edge set is updated to obtain a fourth structural edge set, which includes P fourth subsets.
[0065] Calculate the gradient mean of each of the third subsets and the gradient mean of each of the fourth subsets;
[0066] The edge continuity distortion score of the second image is calculated based on the gradient mean of the third subset and the gradient mean of the fourth subset.
[0067] Specifically, such as Figure 3 As shown, after obtaining the structural image of the second image, edge detection is performed on the structural image using methods such as the Canny edge detection operator. This reveals that the structural image includes M structural edges (i.e., there are M image edges in the structural image), and each structural edge is a first subset. Therefore, the M structural edges correspond to M first subsets. Then, the SIFT operator and other methods are used to match and detect each structural edge in the first set with N first images to obtain the second set of structural edges. After obtaining the second set of structural edges, edge continuity distortion calculation is performed on the structural image. Specifically, the following steps are taken: pixels in the second set of structural edges that are not at image edges are removed, and the set of pixels at structural edges that are at image edges is retained to form a third set of structural edges. The third set of structural edges includes P third subsets, i.e., the set of pixels at P structural edges. For example, if M is 4, there are 4 structural edges, labeled 1, 2, 3, and 4. Figure 4 As shown, the structural edges labeled 1 and 3 are not located at the image edge because the pixel sets corresponding to the structural edges labeled 1 and 3 need to be removed, while the pixel sets corresponding to the structural edges labeled 2 and 4 are retained. That is, P is 2, which means that the third structural edge set includes the pixel sets corresponding to the two structural edge sets labeled 2 and 4.
[0068] After obtaining the third set of structural edges, the first subset of the first set of structural edges can be updated based on the third subset included in the third set of structural edges to obtain the fourth set of structural edges. For example, if the first set of structural edges includes the pixel sets corresponding to structural edges labeled 1, 2, 3, and 4, and the third set of structural edges includes the pixel sets corresponding to structural edges labeled 2 and 4, then the pixel sets corresponding to structural edges labeled 1 and 3 in the first set of structural edges are removed, and the pixel sets corresponding to structural edges labeled 2 and 4 are retained. The pixel sets corresponding to structural edges labeled 2 and 4 constitute the fourth set of structural edges. The pixel set corresponding to structural edge labeled 2 is one fourth subset, and the pixel set corresponding to structural edge labeled 4 is another fourth subset.
[0069] Furthermore, after obtaining the third and fourth structural edge sets, the mean gradient of each third subset in the third structural edge set is calculated, and the mean gradient of each fourth subset in the fourth structural edge set is also calculated, thus obtaining the mean gradients of P third subsets and P fourth subsets. The edge continuity distortion score of the second image is calculated using the mean gradients of the P third subsets and P fourth subsets, thereby revealing the degree of edge breakage at the stitching point after stitching together N first images into a second image.
[0070] Understandably, the average gradient of a subset can be calculated as follows: first, the gradient direction of each pixel in the subset is calculated using methods such as the Sobel operator; then, the average gradient direction of all pixels in the subset is calculated to obtain the average gradient of the subset.
[0071] As an optional embodiment, the edge continuity distortion score of the second image can be calculated using the following formula:
[0072]
[0073] Where q2 represents the edge continuity distortion fraction;
[0074] P represents the number of the third subset or the number of the fourth subset;
[0075] j represents the j-th third subset in the third structural edge set, or the j-th fourth subset in the fourth structural edge set, where j is greater than 0 and less than or equal to P;
[0076] g cj Let represent the mean gradient of the j-th third subset;
[0077] g j Let represent the mean gradient of the j-th fourth subset.
[0078] Specifically, the gradient mean is calculated for each third subset, resulting in P gradient mean values for the third subsets. Similarly, the gradient mean is calculated for each fourth subset, resulting in P gradient mean values for the fourth subsets. For the j-th third subset among the P third subsets and the j-th fourth subset among the P fourth subsets, the sum of the squares of the gradient mean values for the j-th third subset and the j-th fourth subset is calculated to obtain the fifth value. Furthermore, twice the product of the gradient mean values for the j-th third subset and the j-th fourth subset is calculated to obtain the sixth value. The quotient of the fifth value divided by the sixth value is calculated to obtain the seventh value corresponding to the j-th third subset (or the j-th fourth subset). The seventh values for each third subset are calculated using the above method, resulting in P seventh values. These P seventh values are then added together to obtain the eighth value. The value obtained by dividing the eighth value by P is the edge continuity distortion score of the second image.
[0079] As an optional embodiment, step 103, based on the structural image and the N first images, obtains the bleed distortion score of the second image, specifically including:
[0080] Obtain the fifth structural edge set of the overlapping region after stitching together two adjacent first images, and obtain the sixth structural edge set of the overlapping region before stitching. The fifth structural edge set includes Q fifth subsets, each representing the set of pixels of one of the structural edges in the overlapping region. The sixth structural edge set includes Q sixth subsets, each representing the set of pixels of one of the structural edges in the overlapping region before stitching.
[0081] Calculate the difference image based on the fifth structural edge set and the sixth structural edge set;
[0082] Calculate the absolute value of the difference image, and determine the overlapping area where the absolute value of the difference image is greater than a preset value as the bleeding area;
[0083] Calculate the color difference value of each pixel in the bleed area;
[0084] The average value of the color difference of all pixels is calculated based on the color difference value to obtain the bleeding distortion score.
[0085] Specifically, such as Figure 3 As shown, after acquiring N first images and second images, bleed distortion calculation is performed, specifically through the following steps: Among the N first images, two adjacent first images will have overlapping areas when stitched together, such as... Figure 2The filling region 21 between the two first images is as follows: Before stitching, the overlapping region of one of the first images includes Q structural edges, and the set of pixels of each structural edge is a fifth subset. The Q fifth subsets form the fifth structural edge set. After stitching, the overlapping region includes Q structural edges, and the set of pixels of each structural edge is a sixth subset. The Q sixth subsets form the sixth structural edge set. Based on the fifth and sixth structural edge sets, a difference image is calculated, and the absolute value of the difference image is calculated. This absolute value is compared with a preset value. If the absolute value of the difference image is less than or equal to the preset value, the bleeding distortion score is not calculated, and the bleeding distortion score can be set to 1. If the absolute value of the difference image is greater than the preset value, it indicates that the overlapping region is a bleeding region. The color difference value of each pixel in the bleeding region can be calculated using the CMC color difference calculation formula, i.e., the color offset value. Then, the average value of the color difference value of the bleeding region is calculated based on the color difference values of all pixels in the bleeding region, and this average value is used as the bleeding distortion score.
[0086] It is understandable that if the edge set of the fifth structure is: {R1, R2…R…} k The sixth structure edge set is: {R} c1 ,R c2 …R ck The difference image is obtained by subtracting the corresponding pixel from the corresponding pixel in the sixth subset of the sixth subset of the fifth structural edge set from the pixel in the fifth structural edge set. The difference image is: {R1-R} c1 R2-R c2 …R k -R ck}
[0087] It should be noted that the preset value is a value set in advance to determine whether the overlapping area is a bleeding area, and can be set as needed.
[0088] As an optional embodiment, in step 104, the quality score of the second image is obtained by fusing the viewpoint transformation distortion score, the edge continuity distortion score, and the bleed distortion score. Specifically, the quality score of the second image can be calculated using the following formula:
[0089]
[0090] Where q represents the quality score of the second image;
[0091] q3 represents the bleeding distortion fraction;
[0092] a, b, and d are preset values greater than 0, and the sum of a, b, and d is 1.
[0093] Specifically, the perspective transformation distortion score, edge continuity distortion score, and bleed distortion score are fused using the above formula to obtain the quality score of the second image. Preferably, a = b = 0.3, d = 0.4.
[0094] In summary, the embodiments of this application obtain N first images to be stitched together and a second image obtained by stitching together the N first images. The second image is then subjected to structural texture decomposition to obtain a structural image, thereby obtaining the edge information of the second image. Furthermore, based on the structural image and the N first images, at least one of the following is obtained: a viewpoint transformation distortion score, an edge continuity distortion score, and a bleed distortion score. The viewpoint transformation distortion score characterizes the degree of viewpoint distortion of the second image obtained after viewpoint transformation of the N first images. This score indicates whether the stitched second image is distorted and the degree of distortion. The edge continuity distortion score characterizes the continuity at the stitching point of the N first images. This score indicates whether the edges of the stitched second image are broken and the degree of breakage. The bleed distortion score characterizes the degree of color distortion in the overlapping area after stitching together the N first images. This score indicates whether there is a color difference between the images before and after stitching and the magnitude of the color difference. Based on the perspective transformation distortion score, the edge continuity distortion score, and the bleed distortion score, the quality score of the second image is obtained. According to the quality score, the image quality evaluation result of the second image is determined. That is, the image perception quality of the second image is detected by judging whether the stitched second image is deformed and the degree of deformation, whether the edges of the second image are broken and the degree of breakage, and whether there is a color difference between the images before and after stitching and the size of the color difference, so as to obtain an accurate evaluation result.
[0095] The image quality acquisition method provided in this application can be executed by an image quality acquisition device. This application uses an image quality acquisition device executing the image quality acquisition method as an example to illustrate the image quality acquisition device provided in this application.
[0096] like Figure 5 As shown in the figure, this application embodiment also provides an image quality acquisition device 500, including:
[0097] The first acquisition module 501 is used to acquire N first images to be stitched together, and to acquire a second image after stitching together the N first images, where N is an integer greater than 1;
[0098] The first processing module 502 is used to perform structural texture decomposition on the second image to obtain a structural image;
[0099] The second processing module 503 is used to obtain at least one of the following in the second image based on the structure image and the N first images: a viewpoint transformation distortion score, an edge continuity distortion score, and a bleed distortion score. The viewpoint transformation distortion score is used to characterize the degree of viewpoint distortion of the second image obtained after the N first images are transformed. The edge continuity distortion score is used to characterize the continuity at the stitching point of the N first images. The bleed distortion score is used to characterize the degree of color distortion in the overlapping area after the N first images are stitched together.
[0100] The third processing module 504 is used to obtain the quality score of the second image based on at least one of the viewpoint transformation distortion score, the edge continuity distortion score, and the bleed distortion score.
[0101] In the above embodiments of this application, by acquiring N first images to be stitched and a second image obtained by stitching the N first images, structural texture decomposition is performed on the second image to obtain a structural image, thereby obtaining the edge information of the second image. Furthermore, based on the structural image and the N first images, at least one of the following is obtained: a viewpoint transformation distortion score, an edge continuity distortion score, and a bleed distortion score. The viewpoint transformation distortion score characterizes the degree of viewpoint distortion of the second image obtained after viewpoint transformation of the N first images; this score indicates whether the stitched second image is distorted and the degree of distortion. The edge continuity distortion score characterizes the continuity at the stitching point of the N first images; this score indicates whether the edges of the stitched second image are broken and the degree of breakage. The bleed distortion score characterizes the degree of color distortion in the overlapping area after stitching the N first images; this score indicates whether there is a color difference between the images before and after stitching and the magnitude of the color difference. The quality score of the second image is obtained based on at least one of the perspective transformation distortion score, the edge continuity distortion score, and the bleed distortion score. That is, the image quality of the second image is determined by judging at least one of the following: whether the stitched second image is distorted and the degree of distortion, whether the edges of the second image are broken and the degree of breakage, and whether there is a color difference between the images before and after stitching and the size of the color difference.
[0102] Optionally, when the second processing module 503 obtains the viewpoint transformation distortion score of the second image based on the structure image and the N first images, it is specifically used for:
[0103] Edge detection is performed on the structural image to obtain a first set of structural edges. The first set of structural edges includes M first subsets, each of which represents one of the structural edges in the second image, where M is an integer greater than 0.
[0104] Each structural edge in the first set of structural edges is matched and detected with the N first images to obtain a second set of structural edges. The second set of structural edges includes M second subsets, which represent the structural edges in the N first images that match the first subset.
[0105] Obtain the first curvature of each first subset in the first set of structural edges and the second curvature of each second subset in the second set of structural edges;
[0106] The viewpoint transformation distortion score of the second image is calculated based on M of the first curvature and M of the second curvature.
[0107] Optionally, the first subset represents the set of pixels of one of the structural edges in the second image, and the second subset represents the set of pixels of the structural edges in the N first images that match the first subset.
[0108] Optionally, the viewpoint transformation distortion fraction of the second image is calculated using the following formula:
[0109]
[0110] Where q1 represents the viewpoint transformation distortion fraction;
[0111] M represents the number of the first subset or the number of the second subset;
[0112] i represents the i-th first subset in the first structural edge set, or the i-th second subset in the second structural edge set, where i is greater than 0 and less than or equal to M;
[0113] r ci Denotes the first curvature of the i-th first subset;
[0114] r i Let represent the second curvature of the i-th second subset.
[0115] Optionally, when the second processing module 503 obtains the edge continuity distortion score of the second image based on the structural image and the N first images, it is specifically used for:
[0116] Edge detection is performed on the structural image to obtain a first set of structural edges. The first set of structural edges includes M first subsets, each of which represents one of the structural edges in the second image, where M is an integer greater than 0.
[0117] Each structural edge in the first set of structural edges is matched and detected with the N first images to obtain a second set of structural edges. The second set of structural edges includes M second subsets, which represent the structural edges in the N first images that match the first subset.
[0118] Pixels that are not located at the image edge in the second structural edge set are removed to obtain a third structural edge set, which includes P third subsets, where P is an integer greater than 0 and less than or equal to M;
[0119] Based on the third structural edge set, the first structural edge set is updated to obtain a fourth structural edge set, which includes P fourth subsets.
[0120] Calculate the gradient mean of each of the third subsets and the gradient mean of each of the fourth subsets;
[0121] The edge continuity distortion score of the second image is calculated based on the gradient mean of the third subset and the gradient mean of the fourth subset.
[0122] Optionally, the edge continuity distortion score of the second image is calculated using the following formula:
[0123]
[0124] Where q2 represents the edge continuity distortion fraction;
[0125] P represents the number of the third subset or the number of the fourth subset;
[0126] j represents the j-th third subset in the third structural edge set, or the j-th fourth subset in the fourth structural edge set, where j is greater than 0 and less than or equal to P;
[0127] g cj Let represent the mean gradient of the j-th third subset;
[0128] g j Let represent the mean gradient of the j-th fourth subset.
[0129] Optionally, when the second processing module 503 obtains the bleed distortion score of the second image based on the structural image and the N first images, it is specifically used for:
[0130] Obtain the fifth structural edge set of the overlapping region after stitching together two adjacent first images, and obtain the sixth structural edge set of the overlapping region before stitching. The fifth structural edge set includes Q fifth subsets, each representing the set of pixels of one of the structural edges in the overlapping region. The sixth structural edge set includes Q sixth subsets, each representing the set of pixels of one of the structural edges in the overlapping region before stitching.
[0131] Calculate the difference image based on the fifth structural edge set and the sixth structural edge set;
[0132] Calculate the absolute value of the difference image, and determine the overlapping area where the absolute value of the difference image is greater than a preset value as the bleeding area;
[0133] Calculate the color difference value of each pixel in the bleed area;
[0134] The average value of the color difference of all pixels is calculated based on the color difference value to obtain the bleeding distortion score.
[0135] Optionally, the quality score of the second image is calculated using the following formula:
[0136]
[0137] Where q represents the quality score of the second image;
[0138] q3 represents the bleeding distortion fraction;
[0139] a, b, and d are preset values greater than 0, and the sum of a, b, and d is 1.
[0140] In summary, the embodiments of this application obtain N first images to be stitched together and a second image obtained by stitching together the N first images. The second image is then subjected to structural texture decomposition to obtain a structural image, thereby obtaining the edge information of the second image. Furthermore, based on the structural image and the N first images, at least one of the following is obtained: a viewpoint transformation distortion score, an edge continuity distortion score, and a bleed distortion score. The viewpoint transformation distortion score characterizes the degree of viewpoint distortion of the second image obtained after viewpoint transformation of the N first images. This score indicates whether the stitched second image is distorted and the degree of distortion. The edge continuity distortion score characterizes the continuity at the stitching point of the N first images. This score indicates whether the edges of the stitched second image are broken and the degree of breakage. The bleed distortion score characterizes the degree of color distortion in the overlapping area after stitching together the N first images. This score indicates whether there is a color difference between the images before and after stitching and the magnitude of the color difference. Based on the perspective transformation distortion score, the edge continuity distortion score, and the bleed distortion score, the quality score of the second image is obtained. According to the quality score, the image quality evaluation result of the second image is determined. That is, the image perception quality of the second image is detected by judging whether the stitched second image is deformed and the degree of deformation, whether the edges of the second image are broken and the degree of breakage, and whether there is a color difference between the images before and after stitching and the size of the color difference, so as to obtain an accurate evaluation result.
[0141] The image quality acquisition device in this application embodiment can be an electronic device or a component within an electronic device, such as an integrated circuit or a chip. The electronic device can be a terminal or other devices besides a terminal. For example, the electronic device can be a mobile phone, tablet computer, laptop computer, PDA, in-vehicle electronic device, mobile internet device (MID), augmented reality (AR) / virtual reality (VR) device, robot, wearable device, ultra-mobile personal computer (UMPC), netbook, or personal digital assistant (PDA), etc. It can also be a server, network attached storage (NAS), personal computer (PC), television (TV), ATM, or self-service machine, etc. This application embodiment does not specifically limit the device.
[0142] The image quality acquisition device in this application embodiment can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this application embodiment does not specifically limit it.
[0143] The image quality acquisition device provided in this application embodiment can achieve... Figures 1 to 4 The various processes implemented in the method implementation examples will not be described again here to avoid repetition.
[0144] Optionally, such as Figure 6 As shown, this application embodiment also provides an electronic device 600, including a processor 601 and a memory 602. The memory 602 stores a program or instructions that can run on the processor 601. When the program or instructions are executed by the processor 601, they implement the various steps of the above-described image quality acquisition method embodiment and can achieve the same technical effect. To avoid repetition, they will not be described again here.
[0145] It should be noted that the electronic devices in the embodiments of this application include the mobile electronic devices and non-mobile electronic devices described above.
[0146] Figure 7 A schematic diagram of the hardware structure of an electronic device to implement an embodiment of this application.
[0147] The electronic device 1000 includes, but is not limited to, components such as: radio frequency unit 1001, network module 1002, audio output unit 1003, input unit 1004, sensor 1005, display unit 1006, user input unit 1007, interface unit 1008, memory 1009, and processor 1010.
[0148] Those skilled in the art will understand that the electronic device 1000 may also include a power supply (such as a battery) for supplying power to various components. The power supply may be logically connected to the processor 1010 through a power management system, thereby enabling functions such as managing charging, discharging, and power consumption through the power management system. Figure 7 The electronic device structure shown does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or combine certain components, or have different component arrangements, which will not be elaborated here.
[0149] The processor 1010 is used to acquire N first images to be stitched together, and to acquire a second image after stitching together the N first images, where N is an integer greater than 1;
[0150] Perform structural texture decomposition on the second image to obtain a structural image;
[0151] Based on the structural image and the N first images, at least one of the following is obtained for the second image: viewpoint transformation distortion score, edge continuity distortion score, and bleed distortion score. The viewpoint transformation distortion score is used to characterize the degree of viewpoint distortion of the second image obtained after the N first images are transformed. The edge continuity distortion score is used to characterize the continuity at the stitching point of the N first images. The bleed distortion score is used to characterize the degree of color distortion in the overlapping area after the N first images are stitched together.
[0152] The quality score of the second image is obtained based on at least one of the viewpoint transformation distortion score, the edge continuity distortion score, and the bleed distortion score.
[0153] In the above embodiments of this application, by acquiring N first images to be stitched and a second image obtained by stitching the N first images, structural texture decomposition is performed on the second image to obtain a structural image, thereby obtaining the edge information of the second image. Furthermore, based on the structural image and the N first images, at least one of the following is obtained: a viewpoint transformation distortion score, an edge continuity distortion score, and a bleed distortion score. The viewpoint transformation distortion score characterizes the degree of viewpoint distortion of the second image obtained after viewpoint transformation of the N first images; this score indicates whether the stitched second image is distorted and the degree of distortion. The edge continuity distortion score characterizes the continuity at the stitching point of the N first images; this score indicates whether the edges of the stitched second image are broken and the degree of breakage. The bleed distortion score characterizes the degree of color distortion in the overlapping area after stitching the N first images; this score indicates whether there is a color difference between the images before and after stitching and the magnitude of the color difference. The quality score of the second image is obtained based on at least one of the perspective transformation distortion score, the edge continuity distortion score, and the bleed distortion score. That is, the image quality of the second image is determined by judging at least one of the following: whether the stitched second image is distorted and the degree of distortion, whether the edges of the second image are broken and the degree of breakage, and whether there is a color difference between the images before and after stitching and the size of the color difference.
[0154] Optionally, when the processor 1010 obtains the viewpoint transformation distortion score of the second image based on the structural image and the N first images, it is specifically used for:
[0155] Edge detection is performed on the structural image to obtain a first set of structural edges. The first set of structural edges includes M first subsets, each of which represents one of the structural edges in the second image, where M is an integer greater than 0.
[0156] Each structural edge in the first set of structural edges is matched and detected with the N first images to obtain a second set of structural edges. The second set of structural edges includes M second subsets, which represent the structural edges in the N first images that match the first subset.
[0157] Obtain the first curvature of each first subset in the first set of structural edges and the second curvature of each second subset in the second set of structural edges;
[0158] The viewpoint transformation distortion score of the second image is calculated based on M of the first curvature and M of the second curvature.
[0159] Optionally, the first subset represents the set of pixels of one of the structural edges in the second image, and the second subset represents the set of pixels of the structural edges in the N first images that match the first subset.
[0160] Optionally, the viewpoint transformation distortion fraction of the second image is calculated using the following formula:
[0161]
[0162] Where q1 represents the viewpoint transformation distortion fraction;
[0163] M represents the number of the first subset or the number of the second subset;
[0164] i represents the i-th first subset in the first structural edge set, or the i-th second subset in the second structural edge set, where i is greater than 0 and less than or equal to M;
[0165] r ci Denotes the first curvature of the i-th first subset;
[0166] r i Let represent the second curvature of the i-th second subset.
[0167] Optionally, when the processor 1010 obtains the edge continuity distortion score of the second image based on the structural image and the N first images, it is specifically used for:
[0168] Edge detection is performed on the structural image to obtain a first set of structural edges. The first set of structural edges includes M first subsets, each of which represents one of the structural edges in the second image, where M is an integer greater than 0.
[0169] Each structural edge in the first set of structural edges is matched and detected with the N first images to obtain a second set of structural edges. The second set of structural edges includes M second subsets, which represent the structural edges in the N first images that match the first subset.
[0170] Pixels that are not located at the image edge in the second structural edge set are removed to obtain a third structural edge set, which includes P third subsets, where P is an integer greater than 0 and less than or equal to M;
[0171] Based on the third structural edge set, the first structural edge set is updated to obtain a fourth structural edge set, which includes P fourth subsets.
[0172] Calculate the gradient mean of each of the third subsets and the gradient mean of each of the fourth subsets;
[0173] The edge continuity distortion score of the second image is calculated based on the gradient mean of the third subset and the gradient mean of the fourth subset.
[0174] Optionally, the edge continuity distortion score of the second image is calculated using the following formula:
[0175]
[0176] Where q2 represents the edge continuity distortion fraction;
[0177] P represents the number of the third subset or the number of the fourth subset;
[0178] j represents the j-th third subset in the third structural edge set, or the j-th fourth subset in the fourth structural edge set, where j is greater than 0 and less than or equal to P;
[0179] g cj Let represent the mean gradient of the j-th third subset;
[0180] g j Let represent the mean gradient of the j-th fourth subset.
[0181] Optionally, when the processor 1010 obtains the bleed distortion score of the second image based on the structural image and the N first images, it is specifically used for:
[0182] Obtain the fifth structural edge set of the overlapping region after stitching together two adjacent first images, and obtain the sixth structural edge set of the overlapping region before stitching. The fifth structural edge set includes Q fifth subsets, each representing the set of pixels of one of the structural edges in the overlapping region. The sixth structural edge set includes Q sixth subsets, each representing the set of pixels of one of the structural edges in the overlapping region before stitching.
[0183] Calculate the difference image based on the fifth structural edge set and the sixth structural edge set;
[0184] Calculate the absolute value of the difference image, and determine the overlapping area where the absolute value of the difference image is greater than a preset value as the bleeding area;
[0185] Calculate the color difference value of each pixel in the bleed area;
[0186] The average value of the color difference of all pixels is calculated based on the color difference value to obtain the bleeding distortion score.
[0187] Optionally, the quality score of the second image is calculated using the following formula:
[0188]
[0189] Where q represents the quality score of the second image;
[0190] q3 represents the bleeding distortion fraction;
[0191] a, b, and d are preset values greater than 0, and the sum of a, b, and d is 1.
[0192] In summary, the embodiments of this application obtain N first images to be stitched together and a second image obtained by stitching together the N first images. The second image is then subjected to structural texture decomposition to obtain a structural image, thereby obtaining the edge information of the second image. Furthermore, based on the structural image and the N first images, at least one of the following is obtained: a viewpoint transformation distortion score, an edge continuity distortion score, and a bleed distortion score. The viewpoint transformation distortion score characterizes the degree of viewpoint distortion of the second image obtained after viewpoint transformation of the N first images. This score indicates whether the stitched second image is distorted and the degree of distortion. The edge continuity distortion score characterizes the continuity at the stitching point of the N first images. This score indicates whether the edges of the stitched second image are broken and the degree of breakage. The bleed distortion score characterizes the degree of color distortion in the overlapping area after stitching together the N first images. This score indicates whether there is a color difference between the images before and after stitching and the magnitude of the color difference. Based on the perspective transformation distortion score, the edge continuity distortion score, and the bleed distortion score, the quality score of the second image is obtained. According to the quality score, the image quality evaluation result of the second image is determined. That is, the image perception quality of the second image is detected by judging whether the stitched second image is deformed and the degree of deformation, whether the edges of the second image are broken and the degree of breakage, and whether there is a color difference between the images before and after stitching and the size of the color difference, so as to obtain an accurate evaluation result.
[0193] It should be understood that, in this embodiment, the input unit 1004 may include a graphics processing unit (GPU) 10041 and a microphone 10042. The GPU 10041 processes image data of still images or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The display unit 1006 may include a display panel 10061, which may be configured in the form of a liquid crystal display, an organic light-emitting diode, or the like. The user input unit 1007 includes a touch panel 10071 and at least one of other input devices 10072. The touch panel 10071 is also called a touch screen. The touch panel 10071 may include a touch detection device and a touch controller. Other input devices 10072 may include, but are not limited to, physical keyboards, function keys (such as volume control buttons, power buttons, etc.), trackballs, mice, and joysticks, which will not be described in detail here.
[0194] The memory 1009 can be used to store software programs and various data. The memory 1009 may primarily include a first storage area for storing programs or instructions and a second storage area for storing data. The first storage area may store the operating system, application programs or instructions required for at least one function (such as sound playback, image playback, etc.). Furthermore, the memory 1009 may include volatile memory or non-volatile memory, or both. The non-volatile memory may be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), or flash memory. Volatile memory can be random access memory (RAM), static random access memory (SRAM), dynamic random access memory (DRAM), synchronous dynamic random access memory (SDRAM), double data rate synchronous dynamic random access memory (DDRSDRAM), enhanced synchronous dynamic random access memory (ESDRAM), synchronous link dynamic random access memory (SLDRAM), and direct memory bus RAM (DRRAM). The memory 1009 in this embodiment includes, but is not limited to, these and any other suitable types of memory.
[0195] The processor 1010 may include one or more processing units; optionally, the processor 1010 integrates an application processor and a modem processor, wherein the application processor mainly handles operations involving the operating system, user interface, and applications, and the modem processor mainly handles wireless communication signals, such as a baseband processor. It is understood that the aforementioned modem processor may also not be integrated into the processor 1010.
[0196] This application also provides a readable storage medium storing a program or instructions. When the program or instructions are executed by a processor, they implement the various processes of the above-described image quality acquisition method embodiments and achieve the same technical effect. To avoid repetition, they will not be described again here.
[0197] The processor is the processor in the electronic device described in the above embodiments. The readable storage medium includes computer-readable storage media, such as computer read-only memory (ROM), random access memory (RAM), magnetic disk, or optical disk.
[0198] This application embodiment also provides a chip, which includes a processor and a communication interface. The communication interface is coupled to the processor. The processor is used to run programs or instructions to implement the various processes of the above-described image quality acquisition method embodiments and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0199] It should be understood that the chip mentioned in the embodiments of this application may also be referred to as a system-on-a-chip, system chip, chip system, or system-on-a-chip, etc.
[0200] This application provides a computer program product, which is stored in a storage medium and executed by at least one processor to implement the various processes of the above-described image quality acquisition method embodiments, and can achieve the same technical effect. To avoid repetition, it will not be described again here.
[0201] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element. Furthermore, it should be noted that the scope of the methods and apparatuses in the embodiments of this application is not limited to performing functions in the order shown or discussed, but may also include performing functions substantially simultaneously or in the reverse order, depending on the functions involved. For example, the described methods may be performed in a different order than described, and various steps may be added, omitted, or combined. Additionally, features described with reference to certain examples may be combined in other examples.
[0202] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, can be embodied in the form of a computer software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal (which may be a mobile phone, computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application.
[0203] The embodiments of this application have been described above with reference to the accompanying drawings. However, this application is not limited to the specific embodiments described above. The specific embodiments described above are merely illustrative and not restrictive. Those skilled in the art can make many other forms under the guidance of this application without departing from the spirit and scope of the claims, and all of these forms are within the protection scope of this application.
Claims
1. An image quality acquisition method characterized by comprising: include: Obtain N first images to be stitched together, and obtain the second image after stitching together the N first images, where N is an integer greater than 1; Perform structural texture decomposition on the second image to obtain a structural image; Based on the structural image and the N first images, at least one of the following is obtained for the second image: viewpoint transformation distortion score, edge continuity distortion score, and bleed distortion score. The viewpoint transformation distortion score is used to characterize the degree of viewpoint distortion of the second image obtained after the N first images are transformed. The edge continuity distortion score is used to characterize the continuity at the stitching point of the N first images. The bleed distortion score is used to characterize the degree of color distortion in the overlapping area after the N first images are stitched together. The quality score of the second image is obtained based on at least one of the viewpoint transformation distortion score, the edge continuity distortion score, and the bleed-through distortion score. Based on the structural image and the N first images, the viewpoint transformation distortion score of the second image is obtained, including: Edge detection is performed on the structural image to obtain a first set of structural edges. The first set of structural edges includes M first subsets, each of which represents one of the structural edges in the second image, where M is an integer greater than 0. Each structural edge in the first set of structural edges is matched and detected with the N first images to obtain a second set of structural edges. The second set of structural edges includes M second subsets, which represent the structural edges in the N first images that match the first subset. Obtain the first curvature of each first subset in the first set of structural edges and the second curvature of each second subset in the second set of structural edges; The viewpoint transformation distortion score of the second image is calculated based on M of the first curvature and M of the second curvature.
2. The method according to claim 1, characterized in that, The first subset represents the set of pixels of one of the structural edges in the second image, and the second subset represents the set of pixels of the structural edges in the N first images that match the first subset.
3. The method according to claim 1, characterized in that, The viewpoint transformation distortion fraction of the second image is calculated using the following formula: in, This represents the distortion fraction of the viewpoint transformation; M represents the number of the first subset or the number of the second subset; i represents the i-th first subset in the first structural edge set, or the i-th second subset in the second structural edge set; Denotes the first curvature of the i-th first subset; Let represent the second curvature of the i-th second subset.
4. The method according to claim 1, characterized in that, Based on the structural image and the N first images, the edge continuity distortion score of the second image is obtained, including: Edge detection is performed on the structural image to obtain a first set of structural edges. The first set of structural edges includes M first subsets, each of which represents one of the structural edges in the second image, where M is an integer greater than 0. Each structural edge in the first set of structural edges is matched and detected with the N first images to obtain a second set of structural edges. The second set of structural edges includes M second subsets, which represent the structural edges in the N first images that match the first subset. Pixels that are not located at the image edge in the second structural edge set are removed to obtain a third structural edge set, which includes P third subsets, where P is an integer greater than 0 and less than or equal to M; Based on the third structural edge set, the first structural edge set is updated to obtain a fourth structural edge set, which includes P fourth subsets. Calculate the gradient mean of each of the third subsets and the gradient mean of each of the fourth subsets; The edge continuity distortion score of the second image is calculated based on the gradient mean of the third subset and the gradient mean of the fourth subset.
5. The method according to claim 4, characterized in that, The edge continuity distortion score of the second image is calculated using the following formula: in, This represents the edge continuity distortion fraction; P represents the number of the third subset or the number of the fourth subset; j represents the j-th third subset in the third structural edge set, or the j-th fourth subset in the fourth structural edge set; Let represent the mean gradient of the j-th third subset; Let represent the mean gradient of the j-th fourth subset.
6. The method according to claim 1, characterized in that, Based on the structural image and the N first images, the bleed distortion score of the second image is obtained, including: Obtain the fifth structural edge set of the overlapping region after stitching together two adjacent first images, and obtain the sixth structural edge set of the overlapping region before stitching. The fifth structural edge set includes Q fifth subsets, each representing the set of pixels of one of the structural edges in the overlapping region. The sixth structural edge set includes Q sixth subsets, each representing the set of pixels of one of the structural edges in the overlapping region before stitching. Calculate the difference image based on the fifth structural edge set and the sixth structural edge set; Calculate the absolute value of the difference image, and determine the overlapping area where the absolute value of the difference image is greater than a preset value as the bleeding area; Calculate the color difference value of each pixel in the bleed area; The average value of the color difference of all pixels is calculated based on the color difference value to obtain the bleeding distortion score.
7. The method according to claim 1, characterized in that, The quality score of the second image is calculated using the following formula: in, This indicates the quality score of the second image; This represents the percentage of bleeding distortion; a, b, and d are three preset values, and the sum of a, b, and d is 1.
8. An image quality acquisition device, characterized in that, include: The first acquisition module is used to acquire N first images to be stitched together, and to acquire a second image after stitching together the N first images, where N is an integer greater than 1; The first processing module is used to perform structural texture decomposition on the second image to obtain a structural image; The second processing module is used to obtain at least one of the following in the second image based on the structure image and the N first images: a viewpoint transformation distortion score, an edge continuity distortion score, and a bleed distortion score. The viewpoint transformation distortion score is used to characterize the degree of viewpoint distortion of the second image obtained after the N first images are transformed. The edge continuity distortion score is used to characterize the continuity at the stitching point of the N first images. The bleed distortion score is used to characterize the degree of color distortion in the overlapping area after the N first images are stitched together. The third processing module is used to obtain the quality score of the second image based on at least one of the viewpoint transformation distortion score, the edge continuity distortion score, and the bleed-through distortion score. When the second processing module obtains the viewpoint transformation distortion score of the second image based on the structure image and the N first images, it is specifically used for: Edge detection is performed on the structural image to obtain a first set of structural edges. The first set of structural edges includes M first subsets, each of which represents one of the structural edges in the second image, where M is an integer greater than 0. Each structural edge in the first set of structural edges is matched and detected with the N first images to obtain a second set of structural edges. The second set of structural edges includes M second subsets, which represent the structural edges in the N first images that match the first subset. Obtain the first curvature of each first subset in the first set of structural edges and the second curvature of each second subset in the second set of structural edges; The viewpoint transformation distortion score of the second image is calculated based on M of the first curvature and M of the second curvature.
9. An electronic device, characterized in that, It includes a processor and a memory, the memory storing a program or instructions that can run on the processor, the program or instructions being executed by the processor to implement the steps of the image quality acquisition method as described in any one of claims 1-7.