Image zooming method and device, display equipment and storage medium

By performing data stitching and weight calculation methods on the image data arranged in RGBG, the complexity and color distortion problems of image scaling processing in the prior art are solved, and efficient and accurate image scaling effect is achieved.

CN119863357AActive Publication Date: 2025-04-22SHENZHEN AIXIESHENG TECH CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411923312.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-25
Publication Date
2025-04-22
Estimated Expiration
2044-12-25

AI Technical Summary

Technical Problem

Existing image scaling methods cannot be applied to RGBG-arranged image data, resulting in increased processing complexity and color distortion.

Method used

By obtaining the image arranged by RGBG, extracting the R channel and B channel data, rearranging and splicing the data to form a data matrix M. Calculate the position of the target point in matrix M according to the scaling coefficient, select the reference point and calculate its weight value, and finally obtain the target value by the sum of the product of the reference point and the weight value.

Benefits of technology

Direct interpolation and scaling of RGBG data is realized without additional data conversion steps, simplifying the processing flow, improving processing efficiency, and more accurately estimating and retaining color information in the original image, reducing color distortion.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119863357A_ABST
    Figure CN119863357A_ABST
Patent Text Reader

Abstract

The invention relates to an image zooming method and system, display equipment and a storage medium. The method comprises the following steps: acquiring an RGBG arranged image; first data corresponding to an R channel and second data corresponding to a B channel are extracted from the RGBG arranged image, the first data and the second data are rearranged and spliced, and a spliced data matrix is marked as a matrix M; calculating the position of the target point in the matrix M according to the zoom coefficient; selecting a reference point according to the position of the target point in the matrix M; calculating weight values of the reference points according to the number of the reference points and the positions of the reference points; according to the method, the sum of the products of the reference points and the corresponding weight values is calculated, the target value is obtained, and the RGBG data is directly interpolated and scaled, so that the processing flow is simplified, the processing efficiency is improved, the unique arrangement and color characteristics of the RGBG-arranged image data are fully considered, the color information in the original image can be accurately estimated and reserved, and the image quality is improved. And color distortion and confusion are reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to an image scaling method, apparatus, display device and storage medium. Background Art

[0002] The Pentile arrangement screen is a technology widely used in the field of OLED screens. Compared with the traditional RGB arrangement, the Pentile arrangement reduces the number of sub-pixels by sharing sub-pixels between adjacent pixels. In the traditional RGB arrangement, a pixel is composed of three sub-pixels: red (R), green (G) and blue (B), while in the Pentile arrangement, a pixel is composed of red (R) and green (G), or blue (B) and green (G). Therefore, only images using the RGBG arrangement can be displayed normally on the Pentile screen.

[0003] In the field of image processing technology, image scaling is a basic and key technology. With the rapid development of display technology and multimedia applications, the demand for image size and resolution is becoming increasingly diverse, especially in the fields of mobile devices, high-definition display and virtual reality, image scaling technology is particularly important.

[0004] Existing image scaling methods are not suitable for the unique arrangement structure and color characteristics of RGBG-arranged image data. As a special arrangement of image data, RGBG-arranged image data has a sub-pixel arrangement of one red, one blue and two green. This arrangement gives the image a unique advantage in color reproduction and resolution. The RGBG screen sub-pixel arrangement is shown below: Figure 1 As shown. At present, image scaling technology is mainly interpolation method. Common interpolation methods include nearest neighbor interpolation, bilinear interpolation, bicubic interpolation, etc., which estimate the value of new pixels by calculating the values ​​of adjacent pixels to achieve the purpose of image scaling. The commonly used image scaling methods mentioned above need to convert RGBG image data into standard RGB format before processing, which not only increases the complexity of processing, but also may cause color distortion. Therefore, the existing interpolation method is not suitable for scaling image data arranged in RGBG.

[0005] In summary, there is an urgent need for an image scaling method that is simple to process, does not require conversion, and has excellent color. Summary of the invention

[0006] Based on this, it is necessary to provide an image scaling method, device, display device and storage medium that are simple to process, do not require conversion and have excellent color in order to solve the above technical problems.

[0007] An image scaling method, the method comprising:

[0008] Get the RGBG arranged image;

[0009] Extracting first data corresponding to the R channel and second data corresponding to the B channel from the RGBG arranged image, and rearranging the first data and the second data respectively and performing data splicing, the spliced ​​data matrix is ​​recorded as a matrix M;

[0010] According to the scaling factor, the position of the target point in the matrix M is calculated;

[0011] According to the position of the target point in the matrix M, a reference point is selected;

[0012] Calculating weight values ​​of the reference points according to the number of the reference points and the positions of the reference points;

[0013] The sum of the products of the reference points and the corresponding weight values ​​is calculated to obtain the target value.

[0014] In one embodiment, the position of the target point in the matrix M is calculated according to the scaling factor:

[0015]

[0016] Among them, the target point is the data of the i-th row and j-th column, x and y are the position coordinates of the target point in the matrix M, and α and β represent the scaling factor of the row and the scaling factor of the column respectively.

[0017] In one embodiment, the reference point is the distance from the target point in the matrix M, and the reference point M (x', y') is obtained by rounding down the row coordinates and column coordinates of the target point in the matrix M. Then

[0018] M(x′,y′)=(floor(x),floor(y))

[0019] Wherein, x and y are the position coordinates of the target point in the matrix M, and floor(·) means rounding down.

[0020] In one embodiment, selecting a reference point according to the position of the target point in the matrix M comprises:

[0021] If the reference point and the target point are data of the same channel, both are B channel data or both are R channel data, calculate the offset of the reference point relative to the target point:

[0022] offset c =yy′

[0023] offset r =xx′

[0024] If offset c <offset r When , the reference points are selected as M(x′, y′), M(x′+1, y′-1) and M(x′+1, y′+1);

[0025] If offset c >offset r When , select reference points M(x′, y′), M(x′+1, y′+1) and M(x′, y′+2);

[0026] If offset c =offset r When , the reference points are selected as M(x′, y′) and M(x′+1, y′+1);

[0027] If the reference point is B channel data and the target point is R channel data, or the reference point is R channel data and the target point is B channel data, calculate the sum of the offsets of the reference point relative to the target point:

[0028] offset t =offset r +offset c

[0029] If offset t <1, the selected reference points are M(x′, y′+1), M(x′+1, y′) and M(x′, y′-1);

[0030] If offset t >1, the selected reference points are M(x′, y′+1), M(x′+1, y′) and M(x′+1, y′+2);

[0031] If offset t =1, the selected reference points are M(x′+1, y′)) and M(x′, y′+1).

[0032] In one embodiment, calculating the sum of the products of the reference points and the corresponding weight values ​​to obtain the target value includes:

[0033] If the reference points are M(x′, y′) and M(x′+1, y′+1), respectively, the distances between the target point and the reference points M(x′, y′) and M(x′+1, y′+1) are calculated, the ratio of the two distances is used as a first weight, and the product of the pixel values ​​corresponding to the reference points M(x′, y′) and M(x′+1, y′+1) and the first weight is summed to obtain a target value;

[0034] If the reference points are M(x′+1, y′) and M(x′, y′+1), respectively, the distances between the target point and the reference points M(x′+1, y′)) and M(x′, y′+1) are calculated, and the ratio of the two distances is used as the second weight. The product of the pixel values ​​corresponding to the reference points M(x′+1, y′)) and M(x′, y′+1) and the second weight is summed to obtain the target value.

[0035] In one embodiment, calculating the sum of the products of the reference points and the corresponding weight values ​​to obtain the target value further includes:

[0036] The ratio of the areas corresponding to the three reference points M(x′+1, y′-1), M(x′, y′) and M(x′+1, y′+1) is used as the third weight, and the sum of the products of the pixel values ​​of the three reference points M(x′+1, y′-1), M(x, y′) and M(x′+1, y′+1) and the third weight is calculated to obtain the target value.

[0037] An image scaling device, comprising:

[0038] An image acquisition unit, used to acquire an image arranged in RGBG,

[0039] A data processing unit, used for extracting first data corresponding to the R channel and second data corresponding to the B channel from the RGBG arranged image, and rearranging the first data and the second data respectively and performing data splicing, wherein the spliced ​​data matrix is ​​recorded as a matrix M;

[0040] A position mapping unit, used for calculating the position of the target point in the matrix M according to the scaling factor;

[0041] A reference selection unit, used for selecting a reference point according to the position of the target point in the matrix M;

[0042] A weight calculation unit, used to calculate the weight value of the reference point according to the number of the reference points and the positions of the reference points;

[0043] The target acquisition unit is used to calculate the sum of the products of the reference points and the corresponding weight values ​​to obtain the target value.

[0044] A display device includes a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0045] Get the RGBG arranged image;

[0046] Extracting first data corresponding to the R channel and second data corresponding to the B channel from the RGBG arranged image, and rearranging the first data and the second data respectively and performing data splicing, the spliced ​​data matrix is ​​recorded as a matrix M;

[0047] According to the scaling factor, the position of the target point in the matrix M is calculated;

[0048] According to the position of the target point in the matrix M, a reference point is selected;

[0049] Calculating weight values ​​of the reference points according to the number of the reference points and the positions of the reference points;

[0050] The sum of the products of the reference points and the corresponding weight values ​​is calculated to obtain the target value.

[0051] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:

[0052] Get the RGBG arranged image;

[0053] Extracting first data corresponding to the R channel and second data corresponding to the B channel from the RGBG arranged image, and rearranging the first data and the second data respectively and performing data splicing, the spliced ​​data matrix is ​​recorded as a matrix M;

[0054] According to the scaling factor, the position of the target point in the matrix M is calculated;

[0055] According to the position of the target point in the matrix M, a reference point is selected;

[0056] Calculating weight values ​​of the reference points according to the number of the reference points and the positions of the reference points;

[0057] The sum of the products of the reference points and the corresponding weight values ​​is calculated to obtain the target value.

[0058] The above-mentioned image scaling method, device, display device and storage medium obtain an RGBG-arranged image; extract the first data corresponding to the R channel and the second data corresponding to the B channel from the RGBG-arranged image, and rearrange the first data and the second data respectively and perform data stitching, and the stitched data matrix is ​​recorded as matrix M; according to the scaling factor, the position of the target point in the matrix M is calculated; according to the position of the target point in the matrix M, a reference point is selected; according to the number of the reference points and the position of the reference points, the weight value of the reference point is calculated; the sum of the products of the reference points and the corresponding weight values ​​is calculated to obtain the target value, and the RGBG data is directly interpolated and scaled without the need for additional data conversion steps, which greatly simplifies the processing flow, improves the convenience and efficiency of processing, and fully considers the unique arrangement and color characteristics of the red, green and blue sub-pixels in the RGBG-arranged image data, and can more accurately estimate and retain the color information in the original image, reduce color distortion and confusion, and thus achieve a better color restoration effect. BRIEF DESCRIPTION OF THE DRAWINGS

[0059] Figure 1 A schematic diagram of the sub-pixel arrangement of an RGBG screen in the background technology;

[0060] Figure 2 is a schematic flow chart of an image scaling method in one embodiment;

[0061] Figure 3 A schematic diagram of the arrangement of R channel and B channel data in one embodiment;

[0062] Figure 4 A schematic diagram of interpolation of two reference points in one embodiment;

[0063] Figure 5 A schematic diagram of interpolation of three reference points in one embodiment;

[0064] Figure 6 A schematic diagram of weight value calculation in one embodiment;

[0065] Figure 7 is a structural block diagram of an image scaling device in one embodiment;

[0066] Figure 8 The figure is a diagram showing the internal structure of a device in one embodiment. DETAILED DESCRIPTION

[0067] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0068] The image scaling method provided in the present application can be applied to intelligent display devices, wherein the display devices can be, but are not limited to, various personal computers, laptops, smart phones, tablet computers, portable wearable devices, and virtual reality devices.

[0069] In one embodiment, Figure 2 As shown, an image scaling method is provided, which is described by taking the method applied to a display device as an example, and includes the following steps:

[0070] Step S201, obtaining an RGBG arranged image.

[0071] In this embodiment, the RGBG arranged image is the original image data, and each pixel of the RGBG arranged image is an image composed of R, G, and B components. Hereinafter, R represents the intensity of the red channel, B represents the intensity of the blue channel, and G represents the intensity of the green channel. It should be noted that since the G channel has complete data, conventional methods such as bilinear interpolation can be used, and this application will no longer discuss the method for scaling the G channel.

[0072] Step S202: extract first data corresponding to the R channel and second data corresponding to the B channel from the RGBG arranged image, rearrange the first data and the second data respectively, and perform data splicing. The spliced ​​data matrix is ​​recorded as matrix M.

[0073] In this embodiment, the first data corresponding to the R channel and the second data corresponding to the B channel are extracted from the RGBG arranged image, and the data of the R channel and the B channel are rearranged, the arrangement in odd rows is RBRBRBRB..., and the arrangement in even rows is BRBRBRBR..., and the R and B data are spliced ​​to obtain a matrix M of a single-channel image with the same size as the G channel, as shown in detail. Figure 3 As shown, the unique arrangement and color characteristics of red, green, and blue sub-pixels in the RGBG arranged image data are fully considered.

[0074] Step S203: Calculate the position of the target point in the matrix M according to the scaling factor.

[0075] In this embodiment, the position of the target point in the matrix M is calculated according to the scaling factor:

[0076]

[0077] Among them, the target point is the data of the i-th row and j-th column, x and y are the position coordinates of the target point in the matrix M, and α and β represent the scaling factor of the row and the scaling factor of the column respectively.

[0078] Step S204: selecting a reference point according to the position of the target point in the matrix M.

[0079] After obtaining the position coordinates (x, y) of the target point in the matrix M, due to the special arrangement of the RGBG panel, the most commonly used bilinear interpolation algorithm selects the reference point to obtain four reference point coordinates, but only two of these four reference points are the values ​​of the R channel. In this case, the bilinear interpolation method cannot be used, so it is necessary to select an additional reference point to help select the correct reference point to ensure the stability and accuracy of the calculation results.

[0080] In this embodiment, the reference point is the position of the target point in the matrix M. The reference point M (x', y') of the corresponding channel is obtained by rounding down the row coordinates and column coordinates of the position of the target point in the matrix M. Then

[0081] M(x′,y′)=(floor(x),floor(y))

[0082] Among them, x and y are the position coordinates of the target point in the matrix M, and floor(·) means rounding down. The data at the position (x′, y′) in the original RGBG data may be the R channel or the B channel, so it is necessary to accurately select the position point (x, y) of the target point in the matrix M by rounding down the row coordinates and column coordinates to obtain the reference point. For example, to calculate the data of the R channel, it is necessary to select the nearest R channel data. Specifically, the reference point selected according to the position of the target point in the matrix M includes:

[0083] If the reference point and the target point are data of the same channel, both are B channel data or both are R channel data, calculate the offset of the reference point relative to the target point. c 、offset r :

[0084] offset c =yy′

[0085] offset r =xx′

[0086] If otfset c <offset r When , the reference points are selected as M(x′, y′), M(x′+1, y′-1) and M(x′+1, y′+1);

[0087] If offset c >offset r When , select reference points M(x′, y′), M(x′+1, y′+1) and M(x′, y′+2);

[0088] If offset c =offset r When , the reference points are selected as M(x′, y′) and M(x′+1, y′+1); specifically, the two reference points are selected as follows Figure 4 As shown, the three reference points are selected as Figure 5 shown.

[0089] If the reference point is B channel data and the target point is R channel data, or the reference point is R channel data and the target point is B channel data, calculate the sum of the offsets of the reference point relative to the target point. t :

[0090] offset t =offset r +offset c

[0091] If offset t When <1, the selected reference points are M(x′, y′+1), M(x′+1, y′) and M(x′, y′-1);

[0092] If offset t >1, the selected reference points are M(x′, y′+1), M(x′+1, y′) and M(x′+1, y′+2);

[0093] If offset t When =1, the selected reference points are M(x′+1, y′) and M(x′, y′+1).

[0094] Step S205: Calculate the weight value of the reference point according to the number of the reference points and the positions of the reference points.

[0095] like Figure 6 As shown in the figure, when there are three reference points, the weight is calculated by respectively calculating the graphic areas corresponding to the three reference points, denoted as S A , S C and S D , using the area ratio as the weight, we get the weight value W A , W C and W D .

[0096] When there are two reference points, it is only necessary to calculate the distance between the target point and the two reference points, and use the ratio of the distances as a weight.

[0097] Step S206, calculating the sum of the products of the reference points and the corresponding weight values ​​to obtain a target value.

[0098] In this embodiment, the target value is the scaled R and B channel data. When there are three reference points, calculating the sum of the products of the reference points and the corresponding weight values ​​to obtain the target value also includes:

[0099] The ratio of the areas corresponding to the three reference points M(x′+1, y′-1), M(x′, y′) and M(s′+1, y′+1) is used as the third weight, and the sum of the products of the pixel values ​​of the three reference points M(x′+1, y′-1), M(x′, y′) and M(x′+1, y′+1) and the third weight is calculated to obtain the target value.

[0100] For the convenience of explanation, Figure 6 As shown in the figure, A(x1, y1), C(x3, y3) and D(x4, y4) represent the three reference points M(x′+1, y′-1), M(x′, y′) and M(x′+1, y′+1), respectively. The coordinates of the pixel point R′ are (x, y), and its pixel value is the target value f(R′). Then:

[0101] f(R′)=W A *f(A)+W C *f(C)+W D *f(D)

[0102] Wherein f(A), f(C) and f(D) respectively represent the pixel values ​​corresponding to the three reference points.

[0103] When there are two reference points, calculating the sum of the products of the reference points and the corresponding weight values ​​to obtain the target value includes:

[0104] If the reference points are M(x′, y′) and M(x′+1, y′+1), respectively, the distances between the target point and the reference points M(x′, y′) and M(x′+1, yy′+1) are calculated, the ratio of the two distances is used as a first weight, and the product of the pixel values ​​corresponding to the reference points M(x′, y′) and M(x′+1, y′+1) and the first weight is summed to obtain a target value;

[0105] If the reference points are M(x′+1, y′) and M(x′, y′+1), respectively, the distances between the target point and the reference points M(x′+1, y′) and M(x′, y′+1) are calculated, and the ratio of the two distances is used as the second weight. The product of the pixel values ​​corresponding to the reference points M(x′+1, y′) and M(x′, y′+1) and the second weight is summed to obtain the target value.

[0106] This step directly interpolates and scales the RGBG data without the need for additional data conversion steps, greatly simplifying the processing flow, improving the convenience and efficiency of processing, and being able to more accurately estimate and retain the color information in the original image, reducing color distortion and confusion, thereby achieving better color restoration effects.

[0107] In the above-mentioned image scaling method, an RGBG-arranged image is obtained; first data corresponding to the R channel and second data corresponding to the B channel are extracted from the RGBG-arranged image, and the first data and the second data are rearranged and data stitched respectively, and the stitched data matrix is ​​recorded as matrix M; according to the scaling factor, the position of the target point in the matrix M is calculated; according to the position of the target point in the matrix M, a reference point is selected; according to the number of the reference points and the position of the reference points, the weight value of the reference point is calculated; the sum of the product of the reference point and the corresponding weight value is calculated to obtain the target value, and the RGBG data is directly interpolated and scaled without the need for additional data conversion steps, which greatly simplifies the processing flow, improves the convenience and efficiency of processing, and fully considers the unique arrangement and color characteristics of red, green, and blue sub-pixels in the RGBG-arranged image data, can more accurately estimate and retain the color information in the original image, reduce color distortion and confusion, and thus achieve a better color restoration effect.

[0108] It should be understood that although Figure 3 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 3 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0109] In one embodiment, Figure 7 As shown, an image scaling device is provided, comprising: an image acquisition unit 71, a data processing unit 72, a position mapping unit 73, a reference selection unit 74, a weight calculation unit 75 and a target acquisition unit 76, wherein:

[0110] The image acquisition unit 71 is used to acquire an image arranged in RGBG format.

[0111] A data processing unit 72 is used to extract first data corresponding to the R channel and second data corresponding to the B channel from the RGBG arranged image, and respectively rearrange the first data and the second data and perform data splicing, wherein the spliced ​​data matrix is ​​recorded as a matrix M;

[0112] A position mapping unit 73, used for calculating the position of the target point in the matrix M according to the scaling factor;

[0113] A reference selection unit 74, configured to select a reference point according to the position of the target point in the matrix M;

[0114] A weight calculation unit 75, configured to calculate the weight value of the reference point according to the number of the reference points and the positions of the reference points;

[0115] The target acquisition unit 76 is used to calculate the sum of the products of the reference points and the corresponding weight values ​​to obtain the target value.

[0116] Furthermore, the position mapping unit 73 is specifically used to

[0117]

[0118] Among them, the target point is the data of the i-th row and j-th column, x and y are the position coordinates of the target point in the matrix M, and α and β represent the scaling factor of the row and the scaling factor of the column respectively.

[0119] Furthermore, the reference point is the position of the target point in the matrix M, and the reference point M (x', y') is obtained by rounding down the row coordinates and column coordinates of the position of the target point in the matrix M. Then

[0120] M(x′,y′)=(floor(x),floor(y))

[0121] Wherein, x and y are the position coordinates of the target point in the matrix M, and floor(·) means rounding down.

[0122] Furthermore, the reference selection unit 74 is used to calculate the offset of the reference point relative to the target point if the reference point and the target point are data of the same channel, both are B channel data or both are R channel data. c 、offset r :

[0123] offset c =yy′

[0124] offset r =xx′

[0125] If offsetc <offset r When , the reference points are selected as M(x′, y′), M(x′+1, y′-1) and M(x′+1, y′+1);

[0126] If offset c >offset r When , select reference points M(x′, y′), M(x′+1, y′+1) and M(x′, y′+2);

[0127] If offset c =offset r When , the reference points are selected as M(x′, y′) and M(x′+1, y′+1);

[0128] If the reference point is in channel B, calculate the sum of the offsets relative to the position of the target point in the matrix M. t :

[0129] offset t =offset r +offset c

[0130] If offset t <1, the selected reference points are M(x′, y′+1), M(x′+1, y′) and M(x′, y′-1);

[0131] If offset t When >1, the selected reference points are M(x′, y′+1), M(x′+1, y′) and M(x′+1, y′+2);

[0132] If offset t =1, the selected reference points are M(x′+1, y′)) and M(x′, y′+1).

[0133] Furthermore, the target acquisition unit 76 is used to

[0134] If the reference points are M(x′, y′) and M(x′+1, y′+1), respectively, the distances between the target point and the reference points M(x′, y′) and M(x′+1, y′+1) are calculated, the ratio of the two distances is used as a first weight, and the product of the pixel values ​​corresponding to the reference points M(x′, y′) and M(x′+1, y′+1) and the first weight is summed to obtain a target value;

[0135] If the reference points are M(x′+1, y′) and M(x′, y′+1), respectively, the distances between the target point and the reference points M(x′+1, y′)) and M(x′, y′+1) are calculated, and the ratio of the two distances is used as the second weight. The product of the pixel values ​​corresponding to the reference points M(x′+1, y′)) and M(x′, y′+1) and the second weight is summed to obtain the target value.

[0136] Furthermore, the target acquisition unit 76 is also used for:

[0137] The ratio of the areas corresponding to the three reference points M(x′+1, y′-1), M(x′, y′) and M(x′+1, y′+1) is used as the third weight, and the sum of the products of the pixel values ​​of the three reference points M(x′+1, y′-1), M(x′, y′) and M(x′+1, y′+1) and the third weight is calculated to obtain the target value.

[0138] For the specific definition of the image scaling device, please refer to the definition of the image scaling method above, which will not be repeated here. Each module in the above image scaling device can be implemented in whole or in part by software, hardware and a combination thereof. Each of the above modules can be embedded in or independent of the processor in the display device in the form of hardware, or can be stored in the memory in the display device in the form of software, so that the processor can call and execute the operations corresponding to each of the above modules.

[0139] In one embodiment, a display device is provided. The display device may be a terminal, and its internal structure diagram may be as follows: Figure 8 As shown. The display device includes a processor and a memory connected via a system bus. The processor of the display device is used to provide computing and control capabilities. The memory of the display device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores a computer program. The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, an image scaling method is implemented.

[0140] Those skilled in the art will understand that Figure 8 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the display device to which the scheme of the present application is applied. The specific display device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0141] In one embodiment, a display device is provided, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0142] Get the RGBG arranged image;

[0143] Extracting first data corresponding to the R channel and second data corresponding to the B channel from the RGBG arranged image, and rearranging the first data and the second data respectively and performing data splicing, the spliced ​​data matrix is ​​recorded as a matrix M;

[0144] According to the scaling factor, the position of the target point in the matrix M is calculated;

[0145] According to the position of the target point in the matrix M, a reference point is selected;

[0146] Calculating weight values ​​of the reference points according to the number of the reference points and the positions of the reference points;

[0147] The sum of the products of the reference points and the corresponding weight values ​​is calculated to obtain the target value.

[0148] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0149] Get the RGBG arranged image;

[0150] Extracting first data corresponding to the R channel and second data corresponding to the B channel from the RGBG arranged image, and rearranging the first data and the second data respectively and performing data splicing, the spliced ​​data matrix is ​​recorded as a matrix M;

[0151] According to the scaling factor, the position of the target point in the matrix M is calculated;

[0152] According to the position of the target point in the matrix M, a reference point is selected;

[0153] Calculating weight values ​​of the reference points according to the number of the reference points and the positions of the reference points;

[0154] The sum of the products of the reference points and the corresponding weight values ​​is calculated to obtain the target value.

[0155] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0156] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0157] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.

Claims

1. An image scaling method, characterized in that: The method comprises: Get the RGBG arranged image; Extracting first data corresponding to the R channel and second data corresponding to the B channel from the RGBG arranged image, and rearranging the first data and the second data respectively and performing data splicing, wherein the spliced ​​data matrix is ​​recorded as a matrix M; According to the scaling factor, the position of the target point in the matrix M is calculated; According to the position of the target point in the matrix M, a reference point is selected; Calculating weight values ​​of the reference points according to the number of the reference points and the positions of the reference points; The sum of the products of the reference points and the corresponding weight values ​​is calculated to obtain the target value.

2. The method according to claim 1, characterized in that The position of the target point in the matrix M is calculated according to the scaling factor, specifically: Among them, the target point is the data of the i-th row and j-th column, x and y are the position coordinates of the target point in the matrix M, and α and β represent the scaling factor of the row and the scaling factor of the column respectively.

3. The method according to claim 1, characterized in that The reference point is the position of the target point in the matrix M. The reference point M (x', y') of the corresponding channel is obtained by rounding down the row coordinates and column coordinates of the position of the target point in the matrix M. Then: M(x′,y′)=(floor(x),floor(y)) Wherein, x and y are the position coordinates of the target point in the matrix M, and floor(·) means rounding down.

4. The method according to claim 3, characterized in that The selecting of the reference point according to the position of the target point in the matrix M comprises: If the reference point and the target point are data of the same channel, both are B channel data or both are R channel data, calculate the offset of the reference point relative to the target point: offset c =y-y′offset r =x-x′ If offset c <offset r When , the reference points are selected as M(x′, y′), M(x′+1, y′-1) and M(x′+1, y′+1); If offset c >offset r When , select reference points M(x′, y′), M(x′, 1, y′+1) and M(x′, y′+2); If offset c =offset r When , the reference points are selected as M(x′, y′) and M(x′+1, y′+1); If the reference point is B channel data and the target point is R channel data, or the reference point is R channel data and the target point is B channel data, calculate the sum of the offsets of the reference point relative to the target point: offset t =offset r +offset c If offset t When <1, the selected reference points are M(x′, y′+1), M(x′+1, y′) and M(x′, y′-1); If offset t >1, the selected reference points are M(x′, y′+1), M(x′+1, y′) and M(x′+1, y′+2); If offset t When =1, the selected reference points are M(x′+1, y′) and M(x′, y′+1).

5. The method according to claim 4, characterized in that Calculating the sum of the products of the reference points and the corresponding weight values ​​to obtain the target value includes: If the reference points are M(x′, y′) and M(x′+1, y′+1), respectively, the distances between the target point and the reference points M(x′, y′) and M(x′+1, y′+1) are calculated, the ratio of the two distances is used as a first weight, and the product of the pixel values ​​corresponding to the reference points M(x′, y′) and M(x′+1, y′+1) and the first weight is summed to obtain a target value; If the reference points are M(x′+1, y′) and M(x′, y′+1), respectively, the distances between the target point and the reference points M(x′+1, y′) and M(x′, y′+1) are calculated, and the ratio of the two distances is used as the second weight. The product of the pixel values ​​corresponding to the reference points M(x′+1, y′) and M(x′, y′+1) and the second weight is summed to obtain the target value.

6. The method according to claim 4, characterized in that Calculating the sum of the products of the reference points and the corresponding weight values ​​to obtain the target value further includes: The ratio of the areas corresponding to the three reference points M(x′+1, y′-1), M(x′, y′) and M(x′+1, y′+1) is used as the third weight, and the sum of the products of the pixel values ​​of the three reference points M(x′+1, y′-1), M(x′, y′) and M(x′+1, y′+1) and the third weight is calculated to obtain the target value.

7. An image scaling device, characterized in that: The device comprises: An image acquisition unit is used to acquire an image arranged in RGBG. A data processing unit, used for extracting first data corresponding to the R channel and second data corresponding to the B channel from the RGBG arranged image, and rearranging the first data and the second data respectively and performing data splicing, wherein the spliced ​​data matrix is ​​recorded as a matrix M; A position mapping unit, used for calculating the position of the target point in the matrix M according to the scaling factor; A reference selection unit, used for selecting a reference point according to the position of the target point in the matrix M; A weight calculation unit, used to calculate the weight value of the reference point according to the number of the reference points and the positions of the reference points; The target acquisition unit is used to calculate the sum of the products of the reference points and the corresponding weight values ​​to obtain the target value.

8. The device according to claim 7, characterized in that The position mapping unit is specifically used to Among them, the target point is the data of the i-th row and j-th column, x and y are the position coordinates of the target point in the matrix M, and α and β represent the scaling factor of the row and the scaling factor of the column respectively.

9. A display device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Improved video image scaling method based on bilinear interpolation

    CN111275615A

  • Image zooming method and device, electronic equipment and storage medium

    CN114140328A

  • Image processing method and device, electronic equipment and storage medium

    CN117291824A

  • Processing color sub-pixels

    EP2388773A2

  • Image processor, display device including the image processor, and method of driving the display device

    US20190116336A1