Image processing method and device, equipment, medium and product

Through the image processing methods of discrete cosine transform and inverse discrete cosine transform, the problem of poor image magnification effect is solved, high-quality image magnification is achieved, and edge fidelity and computational efficiency are taken into account, reducing hardware resource dependence and update costs.

CN120612231APending Publication Date: 2025-09-09SHENZHEN INST OF ADVANCED TECH CHINESE ACAD OF SCI
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511106347.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-08
Publication Date
2025-09-09

AI Technical Summary

Technical Problem

In the existing technology, it is difficult for image magnification methods to balance edge sharpness and overall smoothness, and deep learning-based methods are highly dependent on hardware resources and have high update costs.

Method used

The image processing method of discrete cosine transform and inverse discrete cosine transform is adopted to achieve high-quality image magnification through image segmentation, frequency domain processing and image splicing.

Benefits of technology

It achieves high-quality image magnification, balances edge fidelity and computational efficiency, and reduces dependence on hardware resources and update costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120612231A_ABST
    Figure CN120612231A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an image processing method and device, equipment and a medium, and the method comprises the steps: determining a first image and a parameter for carrying out the image amplification processing of the first image in response to an image processing configuration operation; performing image segmentation on the first image according to the parameters to obtain a plurality of first image blocks of which the sizes are image block sizes; performing discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix; performing size amplification on each first two-dimensional frequency domain coefficient matrix according to the parameters to obtain an amplified second two-dimensional frequency domain coefficient matrix; performing inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block subjected to image amplification processing; and carrying out image splicing on the second image blocks to obtain a second image. According to the technical scheme of the embodiment of the invention, the problem of poor image amplification effect is solved, high-quality image amplification processing is realized, and both edge fidelity and calculation efficiency can be considered.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] Embodiments of the present invention relate to the field of image analysis technology, and in particular to an image processing method, apparatus, device, medium, and product. Background Art

[0002] Among the technical solutions for image magnification, pixel-domain interpolation and deep learning-based super-resolution methods are commonly used. However, interpolation methods struggle to achieve both edge sharpness and overall smoothness, while deep learning methods rely heavily on hardware resources and are expensive to update. Currently, no image magnification method has been developed that is both computationally efficient and provides excellent magnification results. Summary of the Invention

[0003] The embodiments of the present invention provide an image processing method, apparatus, device, medium, and product, which can achieve high-quality and high-magnification image magnification processing, and can balance edge fidelity and computational efficiency.

[0004] In a first aspect, an embodiment of the present invention provides an image processing method, the method comprising:

[0005] In response to an image processing configuration operation, determining a first image and parameters for performing image magnification processing on the first image;

[0006] Performing image segmentation on the first image according to the image block size indicated by the parameter to obtain a plurality of first image blocks having a size of the image block size;

[0007] Performing a discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix;

[0008] enlarging each first two-dimensional frequency domain coefficient matrix according to the image magnification factor indicated by the parameter to obtain an enlarged second two-dimensional frequency domain coefficient matrix;

[0009] performing an inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block that has undergone image magnification processing;

[0010] Each second image block is stitched together according to the connection order of the corresponding first image blocks to obtain a second image, wherein the second image is an enlarged image corresponding to the first image.

[0011] In a second aspect, an embodiment of the present invention provides an image processing device, the device comprising:

[0012] An image processing task acquisition module, configured to determine a first image and parameters for image magnification processing for the first image in response to an image processing configuration operation;

[0013] An image segmentation module, configured to segment the first image according to the image block size indicated by the parameter to obtain a plurality of first image blocks having a size of the image block size;

[0014] An image cosine transform module, configured to perform discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix;

[0015] An image magnification module, configured to magnify each first two-dimensional frequency domain coefficient matrix according to an image magnification factor indicated by a parameter to obtain an enlarged second two-dimensional frequency domain coefficient matrix;

[0016] an image inverse cosine transform module, configured to perform an inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block that has undergone image magnification processing;

[0017] The image stitching module is used to stitch each second image block according to the connection order of the corresponding first image blocks to obtain a second image, wherein the second image is an enlarged image corresponding to the first image.

[0018] In a third aspect, an embodiment of the present invention further provides a computer device, comprising:

[0019] one or more processors;

[0020] a memory for storing one or more programs;

[0021] When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method provided by any embodiment of the present invention.

[0022] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the image processing method provided by any embodiment of the present invention.

[0023] In a fifth aspect, an embodiment of the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the image processing method provided by any embodiment of the present invention.

[0024] The embodiments of the above invention have the following advantages or beneficial effects:

[0025] The technical solution of the embodiment of the present invention determines a first image and parameters for image magnification processing for the first image in response to an image processing configuration operation; segments the first image according to the image block size indicated by the parameters to obtain a plurality of first image blocks of the image block size; performs a discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix; scales each first two-dimensional frequency domain coefficient matrix according to the image magnification factor indicated by the parameters to obtain an enlarged second two-dimensional frequency domain coefficient matrix; performs an inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block that has undergone image magnification processing; and splices each second image block according to the connection order of the corresponding first image block to obtain a second image, wherein the second image is an enlarged image corresponding to the first image. The technical solution of the embodiment of the present invention solves the problem of poor image magnification effect, achieves high-quality image magnification processing, and can balance edge fidelity and computational efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0026] Figure 1 is a flowchart of an image processing method provided by an embodiment of the present invention;

[0027] Figure 2 This is a schematic diagram of an image magnification parameter configuration page provided by an embodiment of the present invention;

[0028] Figure 3 1 is a schematic diagram of a discrete cosine transform and expansion process of a single image block provided by an embodiment of the present invention;

[0029] Figure 4 This is a schematic diagram showing the effect of another application example of the image processing method provided by an embodiment of the present invention;

[0030] Figure 5a This is a schematic diagram showing the effect of an application example of an image processing method provided by an embodiment of the present invention;

[0031] Figure 5b This is a schematic diagram showing the effect of an application example of an image processing method provided by an embodiment of the present invention;

[0032] Figure 5c This is a schematic diagram showing the effect of an application example of an image processing method provided by an embodiment of the present invention;

[0033] Figure 6 is a structural diagram of an image processing device provided by an embodiment of the present invention;

[0034] Figure 7 It is a structural diagram of a computer device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0035] The present invention will be further described in detail below with reference to the accompanying drawings and examples. It will be understood that the specific embodiments described herein are intended only to illustrate the present invention and are not intended to limit the present invention. It should also be noted that, for ease of description, the accompanying drawings only illustrate portions relevant to the present invention, not all structures.

[0036] Figure 1 This is a flowchart of an image processing method provided in an embodiment of the present invention. This embodiment is applicable to scenarios where image magnification is required. The method can be performed by an image processing device, which can be implemented using software and / or hardware and integrated into a computer device with application development capabilities.

[0037] like Figure 1 As shown, the image processing method of this embodiment includes the following steps:

[0038] S110 : In response to an image processing configuration operation, determine a first image and parameters for performing image magnification processing on the first image.

[0039] The image processing configuration operation can be any operation by which a user who requires image magnification can configure image processing parameters. Users can perform the image processing configuration operation on an interactive page with the image magnification function to enter parameters for the image magnification process. The image magnification process parameters can include a magnification factor and image segment size.

[0040] In an optional embodiment, the image magnification parameter configuration interface may be as follows: Figure 2 The application interaction interface shown. Through the function controls on this page, you can select the image that needs to be magnified, set the magnification, and set the image block size (block size). Among them, after the "Select Image File" function control is triggered, it will be linked to the image file storage path associated with the function control to display the image stored under the image file storage path as a candidate for the enlarged image. The image magnification factor can be any magnification factor. The block size is set because in this embodiment, the image magnification processing is performed in units of image blocks. Different areas of the image may contain different features (such as flat areas, edges, textures), and block processing allows each block to be optimized independently to avoid distortion caused by global unified interpolation or transformation, so as to achieve local optimality. Moreover, multiple image blocks can be calculated in parallel to improve the efficiency of image magnification processing.

[0041] What needs to be explained here is that Figure 2 The magnification factor is 2 and the block size is 128 pixels. These are just examples. Users can input parameters according to image processing requirements.

[0042] S120 . Segment the first image according to the image block size indicated by the parameter to obtain a plurality of first image blocks having a size equal to the image block size.

[0043] That is, the image is divided into multiple N*N first image blocks according to the image block size set in the parameter. Where N is the corresponding image block size. If the image block size is 128, then N is 128, and the first image block is an image block of size 128*128.

[0044] Furthermore, during the image segmentation process, if the dimensions of any image blocks are smaller than N*N, then the image blocks smaller than the image block size in the segmentation results of the first image are pixel-expanded to obtain image blocks of the image block size. For example, a 100*100 image block can be padded with zeros in both dimensions to obtain a 128*128 first image block that meets the parameter requirements.

[0045] S130 , performing discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix.

[0046] The Discrete Cosine Transform (DCT) is a mathematical transformation that converts time-domain or spatial-domain signals into a frequency-domain representation. It is commonly used in signal processing and data compression. Its core concept is to decompose a signal into the sum of cosine functions of different frequencies, with different frequency components corresponding to different signal characteristics.

[0047] In the frequency domain, images can be decomposed into low-frequency and high-frequency components. Low-frequency components correspond to the overall image outline and smooth areas (such as backgrounds and large color blocks), while high-frequency components correspond to image details such as edges, textures, and noise (such as object outlines and text strokes). Image magnification in the frequency domain can reduce artifacts and distortion after magnification.

[0048] For N*N image blocks The formula for discrete cosine transform can be expressed as:

[0049] . That is the corresponding first two-dimensional frequency domain coefficient matrix.

[0050] S140 . Enlarge the size of each first two-dimensional frequency domain coefficient matrix according to the image magnification indicated by the parameter to obtain an enlarged second two-dimensional frequency domain coefficient matrix.

[0051] Specifically, the process of amplifying the first image block in the frequency domain can be to determine the dimension of the second two-dimensional frequency domain coefficient matrix based on the image block size and the image magnification factor; then, according to the dimension, the row and column dimensions of the first two-dimensional frequency domain coefficient matrix are padded with zeros to obtain the second two-dimensional frequency domain coefficient matrix.

[0052] S150 , performing inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block that has undergone image magnification processing.

[0053] An inverse discrete cosine transform is performed on each second two-dimensional frequency domain coefficient matrix, and the second image block can be obtained according to the inverse operation of the formula in step S130.

[0054] Specifically, the image enlargement process of a single image block can be referred to Figure 3 The process shown.

[0055] For a spatial block (spatial image block) of size N*N, a two-dimensional discrete cosine transform (2-DDCT) is performed to obtain an N*N spectrum matrix in the frequency domain. When the magnification factor S is 2, the spectrum matrix can be padded with zeros to sN*sN. Then, a two-dimensional inverse discrete cosine transform (2-DIDCT) is performed to obtain an expanded spatial block of size sN*sN. It should be noted here that Figure 3 The sN*sN size spectrum matrix and spatial blocks in are not fully drawn.

[0056] S160 , performing image stitching on each second image block according to the connection sequence of the corresponding first image blocks to obtain a second image, wherein the second image is an enlarged image corresponding to the first image.

[0057] Furthermore, in an optional implementation, the image magnification effect of the second image may be displayed in response to the image preview triggering operation.

[0058] The second image may be stored in a preset magnified image storage path.

[0059] The technical solution of this embodiment determines a first image and parameters for image magnification processing of the first image in response to an image processing configuration operation; segments the first image according to the image block size indicated by the parameters to obtain a plurality of first image blocks of the image block size; performs a discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix; scales each first two-dimensional frequency domain coefficient matrix according to the image magnification factor indicated by the parameters to obtain a scaled second two-dimensional frequency domain coefficient matrix; performs an inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block that has undergone image magnification processing; and splices each second image block according to the connection order of the corresponding first image blocks to obtain a second image, wherein the second image is an enlarged image corresponding to the first image. The technical solution of the embodiment of the present invention solves the problem of poor image magnification effect, achieves high-quality image magnification processing, and can balance edge fidelity and computational efficiency.

[0060] Figure 4 This is a flowchart of an image processing method provided in an embodiment of the present invention. This embodiment, which shares the same inventive concept as the image processing method described in the previous embodiment, further describes the process of image magnification by channel. This method can be performed by an image processing device, which can be implemented using software and / or hardware and integrated into a computer device with application development capabilities.

[0061] like Figure 4 As shown, the image processing method of this embodiment includes the following steps:

[0062] S210 : In response to an image processing configuration operation, determine a first image and parameters for performing image magnification processing on the first image.

[0063] S220 , dividing the first image into image channels according to preset image colors or data dimensions to obtain a plurality of single-channel first images.

[0064] Image channels are the fundamental dimension of an image. Different image types have different channel structures, such as RGB color images (three channels), BGR images (three channels), and RGBA images (four channels). Processing by channel maintains the independence of each color component, avoiding cross-channel interference and improving image processing performance.

[0065] Assuming that the image channels are divided according to the RGB three channels of the first image, the first image can be split into three channels: B, G, and R. Subsequently, discrete cosine transform can be performed on the single-channel first image corresponding to each channel, and image amplification processing can be performed in the frequency domain.

[0066] S230 , performing image segmentation on each single-channel first image according to the image block size indicated by the parameter, and obtaining a plurality of first image blocks having a size of the image block size in each image channel.

[0067] S240 . Perform discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix.

[0068] S250 , enlarge the size of each first two-dimensional frequency domain coefficient matrix according to the image magnification indicated by the parameter to obtain an enlarged second two-dimensional frequency domain coefficient matrix.

[0069] Specifically, the process of amplifying the first image block in the frequency domain can be to determine the dimension of the second two-dimensional frequency domain coefficient matrix based on the image block size and the image magnification factor; then, according to the dimension, the row and column dimensions of the first two-dimensional frequency domain coefficient matrix are padded with zeros to obtain the second two-dimensional frequency domain coefficient matrix.

[0070] Zero padding in the frequency domain is equivalent to performing ideal low-pass interpolation in the spatial domain, which maximizes the preservation of original high-frequency details. Zero padding at the edges of an image can eliminate block boundary misalignment.

[0071] S260 , performing inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block that has undergone image magnification processing.

[0072] S270 , performing image stitching on each second image block according to the connection order of the corresponding first image blocks to obtain a second image, and performing image merging on the second image of each image channel to obtain a third image.

[0073] The second image is an enlarged image corresponding to the first image. Each image channel corresponds to a second image, and the second images of each image channel are merged to obtain a third image.

[0074] Furthermore, in an optional embodiment, before merging the channel images, the pixel value of each pixel of the second image may be multiplied by the image magnification factor to enhance the image brightness and eliminate the amplitude attenuation caused by frequency domain expansion.

[0075] After multiplying the pixel value of each pixel point of the second image by the image magnification factor, for the pixel points after the pixel value magnification, the pixel values ​​of the pixel points whose pixel values ​​are greater than the preset pixel value upper limit threshold are set as the preset pixel value upper limit threshold, and the pixel values ​​of the pixel points whose pixel values ​​are less than the preset pixel value lower limit threshold are set as the preset pixel value lower limit threshold. The preset pixel value lower limit threshold may be 0, and the preset pixel value upper limit threshold may be 255.

[0076] In any application example of the image processing method provided in this embodiment, the effect of image magnification can be referred to Figure 5a 、 Figure 5b and Figure 5c Schematic diagram of the magnification effect shown. Figure 5a 3 shows a schematic diagram of the effect of triple magnification of a local image of the aorta; Figure 5b A schematic diagram showing the effect of triple magnification of a local image of a cerebral vascular image is shown; and Figure 5c The diagram shows the effect of triple magnification of a local image of a bone image. It can be seen that the image magnification effect of the image processing method provided by this embodiment is better.

[0077] In an alternative implementation, bicubic interpolation can be combined with DCT frequency domain upscaling during image upscaling, leveraging the strengths of both. DCT can better preserve high-frequency details (such as edges and textures), but may result in blocking artifacts or uneven brightness. Bicubic interpolation can smooth pixel transitions and is suitable for low-frequency areas (such as flat areas), but it can blur details.

[0078] Specifically, the low-frequency region of the first image block can be interpolated, while the high-frequency region can be amplified using DCT (hybrid domain fusion). This process involves performing DCT amplification and bicubic interpolation on the image, yielding two results. High-pass filtering can then be used to extract the high-frequency portion (details) of the DCT result and fuse it with the low-frequency portion of the bicubic result. After DCT amplification, interpolation optimization can also be performed on the low-frequency DCT coefficients to reduce blocking artifacts.

[0079] The technical solution of this embodiment determines a first image and parameters for image magnification processing for the first image in response to an image processing configuration operation; divides the first image into image channels according to a preset image color or data dimension to obtain multiple single-channel first images; performs image segmentation on each single-channel first image according to the image block size indicated by the parameter, and obtains multiple first image blocks of the same size as the image block size in each image channel; performs a discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix; scales each first two-dimensional frequency domain coefficient matrix according to the image magnification factor indicated by the parameter to obtain a scaled second two-dimensional frequency domain coefficient matrix; performs an inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block after image magnification processing; stitches each second image block according to the connection order of the corresponding first image block to obtain a second image, and merges the second images of each image channel to obtain a third image. The technical solution of the embodiment of the present invention solves the problem of poor image magnification effect, realizes high-quality image magnification processing by image channel, and can balance edge fidelity and computational efficiency.

[0080] Figure 6 This is a schematic diagram of the structure of an image processing device provided by an embodiment of the present invention. This embodiment is applicable to scenarios of image magnification processing. The image processing device can be implemented by software and / or hardware and integrated into a computer terminal device with application development capabilities.

[0081] like Figure 6 As shown, the image processing apparatus includes: an image processing task acquisition module 310 , an image segmentation module 320 , an image cosine transform module 330 , an image magnification module 340 , an image inverse cosine transform module 350 and an image stitching module 360 ​​.

[0082] Among them, the image processing task acquisition module 310 is used to determine the first image and the parameters for image enlargement processing for the first image in response to the image processing configuration operation; the image segmentation module 320 is used to segment the first image according to the image block size indicated by the parameter to obtain a plurality of first image blocks with the size of the image block; the image cosine transform module 330 is used to perform discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix; the image enlargement module 340 is used to enlarge the size of each first two-dimensional frequency domain coefficient matrix according to the image magnification factor indicated by the parameter to obtain an enlarged second two-dimensional frequency domain coefficient matrix; the image inverse cosine transform module 350 is used to perform inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block that has been image enlarged; the image stitching module 360 ​​is used to stitch each second image block according to the connection order of the corresponding first image block to obtain a second image, wherein the second image is an enlarged image corresponding to the first image.

[0083] The technical solution of this embodiment determines a first image and parameters for image magnification processing of the first image in response to an image processing configuration operation; segments the first image according to the image block size indicated by the parameters to obtain a plurality of first image blocks of the image block size; performs a discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix; scales each first two-dimensional frequency domain coefficient matrix according to the image magnification factor indicated by the parameters to obtain a scaled second two-dimensional frequency domain coefficient matrix; performs an inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block that has undergone image magnification processing; and splices each second image block according to the connection order of the corresponding first image blocks to obtain a second image, wherein the second image is an enlarged image corresponding to the first image. The technical solution of the embodiment of the present invention solves the problem of poor image magnification effect, achieves high-quality image magnification processing, and can balance edge fidelity and computational efficiency.

[0084] In an optional embodiment, the image segmentation module 320 may also be used to:

[0085] Dividing the first image into image channels according to a preset image color or data dimension to obtain a plurality of single-channel first images;

[0086] Image segmentation is performed on each single-channel first image, and a plurality of first image blocks having a size equal to the image block size are obtained in each image channel.

[0087] In an optional implementation, the image stitching module 360 ​​may also be used to:

[0088] The second image of each image channel is merged to obtain a third image.

[0089] In an optional embodiment, the image processing apparatus further includes a brightness enhancement module, configured to:

[0090] multiplying the pixel value of each pixel of the second image by the image magnification factor;

[0091] For the pixel points after pixel value amplification, the pixel values ​​of the pixel points whose pixel values ​​are greater than the preset pixel value upper limit threshold are set to the preset pixel value upper limit threshold, and the pixel values ​​of the pixel points whose pixel values ​​are less than the preset pixel value lower limit threshold are set to the preset pixel value lower limit threshold.

[0092] In an optional implementation, the image magnification module 340 is specifically configured to:

[0093] Determining the dimension of the second two-dimensional frequency domain coefficient matrix according to the image block size and the image magnification factor;

[0094] According to the dimension, the row and column dimensions of the first two-dimensional frequency domain coefficient matrix are padded with zeros to obtain a second two-dimensional frequency domain coefficient matrix.

[0095] In an optional embodiment, the image segmentation module 320 may also be used to:

[0096] For image blocks whose sizes are smaller than the image block size in the segmentation result of the image segmentation performed on the first image, image pixel points are expanded to obtain image blocks of the image block size.

[0097] In an optional embodiment, the image processing apparatus further includes an image preview module, configured to:

[0098] In response to the image preview triggering operation, an image magnification effect of the second image is displayed.

[0099] The image processing device provided by the embodiment of the present invention can execute the image processing method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method.

[0100] Figure 7 A schematic structural diagram of a computer device provided in an embodiment of the present invention. Figure 7 A block diagram of an exemplary computer device 12 suitable for use in implementing embodiments of the present invention is shown. Figure 7 The computer device 12 shown is only an example and should not limit the functionality and scope of use of the embodiments of the present invention. The computer device 12 can be any terminal device with computing capabilities, such as an intelligent controller, a server, a mobile phone, or other terminal devices.

[0101] like Figure 7As shown, computer device 12 is implemented as a general-purpose computing device. Components of computer device 12 may include, but are not limited to, one or more processors or processing units 16, system memory 28, and a bus 18 that connects various system components (including system memory 28 and processing unit 16).

[0102] Bus 18 represents one or more of several types of bus structures, including a memory bus or memory controller, a peripheral bus, an accelerated graphics port, a processor, or a local bus using any of a variety of bus architectures. Examples of these architectures include, but are not limited to, an Industry Standard Architecture (ISA) bus, a Micro Channel Architecture (MAC) bus, an Enhanced ISA bus, a Video Electronics Standards Association (VESA) local bus, and a Peripheral Component Interconnect (PCI) bus.

[0103] The computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by the computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0104] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be configured to read and write non-removable, non-volatile magnetic media ( Figure 7 Not shown, usually called a "hard drive"). Although Figure 7 Although not shown, a magnetic disk drive for reading and writing to a removable non-volatile magnetic disk (e.g., a "floppy disk"), as well as an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. System memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of various embodiments of the present invention.

[0105] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in system memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data, each of which, or some combination thereof, may include an implementation of a network environment. Program modules 42 generally implement the functions and / or methodologies of the embodiments described herein.

[0106] The computer device 12 may also communicate with one or more external devices 14 (e.g., a keyboard, a pointing device, a display 24, etc.), one or more devices that enable a user to interact with the computer device 12, and / or any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., a network card, a modem, etc.). Such communication may be performed via an input / output (I / O) interface 22. Furthermore, the computer device 12 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via a network adapter 20. As shown, the network adapter 20 communicates with the other modules of the computer device 12 via the bus 18. It should be understood that although Figure 7 Not shown, other hardware and / or software modules may be used in conjunction with computer device 12, including but not limited to microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0107] The processing unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing the image processing method provided in the embodiment of the present invention, which includes:

[0108] In response to an image processing configuration operation, determining a first image and parameters for performing image magnification processing on the first image;

[0109] Performing image segmentation on the first image according to the image block size indicated by the parameter to obtain a plurality of first image blocks having a size of the image block size;

[0110] Performing a discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix;

[0111] enlarging each first two-dimensional frequency domain coefficient matrix according to the image magnification factor indicated by the parameter to obtain an enlarged second two-dimensional frequency domain coefficient matrix;

[0112] performing an inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block that has undergone image magnification processing;

[0113] Each second image block is stitched together according to the connection order of the corresponding first image blocks to obtain a second image, wherein the second image is an enlarged image corresponding to the first image.

[0114] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the program is executed by a processor, the image processing method provided in any embodiment of the present invention is implemented. The method includes:

[0115] In response to an image processing configuration operation, determining a first image and parameters for performing image magnification processing on the first image;

[0116] Performing image segmentation on the first image according to the image block size indicated by the parameter to obtain a plurality of first image blocks having a size of the image block size;

[0117] Performing a discrete cosine transform on each first image block to obtain a corresponding first two-dimensional frequency domain coefficient matrix;

[0118] enlarging each first two-dimensional frequency domain coefficient matrix according to the image magnification factor indicated by the parameter to obtain an enlarged second two-dimensional frequency domain coefficient matrix;

[0119] performing an inverse discrete cosine transform on each second two-dimensional frequency domain coefficient matrix to obtain a second image block that has undergone image magnification processing;

[0120] Each second image block is stitched together according to the connection order of the corresponding first image blocks to obtain a second image, wherein the second image is an enlarged image corresponding to the first image.

[0121] The computer storage medium of the embodiments of the present invention may adopt any combination of one or more computer-readable media. The computer-readable medium may be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium may be, for example, but not limited to: an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination thereof. In this document, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, device, or device.

[0122] A computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, which carries computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can transmit, propagate, or transport a program for use by or in conjunction with an instruction execution system, apparatus, or device.

[0123] Program code embodied on a computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.

[0124] The computer program code for performing the operations of the present invention can be written in one or more programming languages, or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0125] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the image processing method provided in any embodiment of the present application.

[0126] During implementation, the computer program product may be written in one or more programming languages ​​or a combination thereof to perform the operations of the present invention. The programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, Python, C++, and conventional procedural programming languages ​​such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0127] Those skilled in the art will appreciate that the modules or steps of the present invention described above can be implemented using a general-purpose computing device. They can be centralized on a single computing device or distributed across a network of multiple computing devices. Alternatively, they can be implemented using program code executable by a computer device, which can then be stored in a storage device and executed by the computing device. Alternatively, they can be fabricated into separate integrated circuit modules, or multiple modules or steps can be fabricated into a single integrated circuit module. Thus, the present invention is not limited to any specific combination of hardware and software.

[0128] Note that the above are only preferred embodiments of the present invention and the technical principles employed. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments, and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in detail through the above embodiments, the present invention is not limited to the above embodiments and may include many other equivalent embodiments without departing from the concept of the present invention. The scope of the present invention is determined by the scope of the appended claims.

Claims

1. An image processing method, characterized in that: include: In response to an image processing configuration operation, determining a first image and parameters for performing image magnification processing on the first image; Performing image segmentation on the first image according to the image block size indicated by the parameter to obtain a plurality of first image blocks having a size of the image block size; Performing a discrete cosine transform on each of the first image blocks to obtain a corresponding first two-dimensional frequency domain coefficient matrix; enlarging each of the first two-dimensional frequency domain coefficient matrices according to the image magnification factor indicated by the parameter to obtain an enlarged second two-dimensional frequency domain coefficient matrix; performing an inverse discrete cosine transform on each of the second two-dimensional frequency domain coefficient matrices to obtain a second image block that has undergone image magnification processing; Each of the second image blocks is stitched together according to the connection order of the corresponding first image blocks to obtain a second image, wherein the second image is an enlarged image corresponding to the first image.

2. The method according to claim 1, characterized in that The step of segmenting the first image according to the image block size indicated by the parameter to obtain a plurality of first image blocks having a size of the image block size includes: Dividing the first image into image channels according to preset image colors or data dimensions to obtain a plurality of single-channel first images; Image segmentation is performed on each of the single-channel first images to obtain a plurality of first image blocks with a size of the image block size in each image channel.

3. The method according to claim 2, characterized in that The method further comprises: The second images of each image channel are merged to obtain a third image.

4. The method according to any one of claims 1 to 3, characterized in that Also includes: multiplying a pixel value of each pixel of the second image by the image magnification factor; For the pixel points after pixel value amplification, the pixel values ​​of the pixel points whose pixel values ​​are greater than the preset pixel value upper limit threshold are set as the preset pixel value upper limit threshold, and the pixel values ​​of the pixel points whose pixel values ​​are less than the preset pixel value lower limit threshold are set as the preset pixel value lower limit threshold.

5. The method according to claim 1, wherein The step of enlarging each of the first two-dimensional frequency domain coefficient matrices according to the image magnification indicated by the parameter to obtain an enlarged second two-dimensional frequency domain coefficient matrix includes: Determining the dimension of the second two-dimensional frequency domain coefficient matrix according to the image block size and the image magnification factor; According to the dimension, zeros are padded in the row and column dimensions of the first two-dimensional frequency domain coefficient matrix to obtain the second two-dimensional frequency domain coefficient matrix.

6. The method according to claim 1, characterized in that Also includes: For image blocks whose sizes are smaller than the image block size in the segmentation result of image segmentation performed on the first image, image pixel points are expanded to obtain image blocks of the image block size.

7. The method according to claim 1, characterized in that Also includes: In response to the image preview triggering operation, an image magnification effect of the second image is displayed.

8. An image processing device, characterized in that: include: an image processing task acquisition module, configured to determine a first image and parameters for image magnification processing for the first image in response to an image processing configuration operation; an image segmentation module, configured to segment the first image according to the image block size indicated by the parameter to obtain a plurality of first image blocks having a size of the image block size; an image cosine transform module, configured to perform a discrete cosine transform on each of the first image blocks to obtain a corresponding first two-dimensional frequency domain coefficient matrix; an image magnification module, configured to magnify each of the first two-dimensional frequency domain coefficient matrices according to the image magnification factor indicated by the parameter to obtain an enlarged second two-dimensional frequency domain coefficient matrix; an image inverse cosine transform module, configured to perform an inverse discrete cosine transform on each of the second two-dimensional frequency domain coefficient matrices to obtain a second image block that has undergone image magnification processing; The image stitching module is configured to stitch each of the second image blocks together according to the connection sequence of the corresponding first image blocks to obtain a second image, wherein the second image is an enlarged image corresponding to the first image.

9. A computer device, characterized in that: The computer device comprises: one or more processors; a memory for storing one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the image processing method according to any one of claims 1 to 7.

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

11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the image processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Image processing method, device and equipment and computer readable storage medium

    CN115018948A

  • Image frame coding method and device, electronic equipment and computer readable storage medium

    CN117097900A