Image processing methods, devices, storage media, and software products

By calculating the color difference and vector scale of image pixels to generate target feature values, the problem of poor performance of traditional convolutional neural networks in recognizing objects at different scales and color changes is solved, and more efficient image processing results are achieved.

CN121147690BActive Publication Date: 2026-11-17CHINA MOBILE M2M +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411812505.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-10
Publication Date
2026-11-17
Estimated Expiration
2044-12-10

AI Technical Summary

Technical Problem

Traditional convolutional neural networks perform poorly in recognizing objects of different scales and have limited effectiveness in recognizing the same objects with different colors.

Method used

By calculating the color difference of each pixel in the image to be processed relative to a pixel reference point, and combining this with the two-dimensional coordinates to calculate the vector scale modulus, target pixel feature values ​​are generated and used as input to a convolutional neural network for processing.

Benefits of technology

It improves the performance of convolutional neural networks in recognizing objects of different scales, enhances robustness to color changes, and improves the accuracy and generalization ability of image recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121147690B_ABST
    Figure CN121147690B_ABST
Patent Text Reader

Abstract

This disclosure relates to the field of image processing technology, and in particular to providing an image processing method, apparatus, storage medium, and program product. The method includes calculating the color difference of each pixel in an image to be processed relative to a pixel reference point in the image; calculating the vector scale magnitude of each pixel based on its two-dimensional coordinates in the image and the color difference; and calculating the target pixel feature value of each pixel based on the vector scale magnitude and the color difference. By calculating the target pixel feature value of each pixel using the color difference of each pixel in the image to be processed relative to the pixel reference point and the vector scale magnitude of each pixel, the target pixel feature value of each pixel can be calculated. This alleviates the problem of poor performance of traditional convolutional layers in processing objects of different scales, and also alleviates the limited performance in recognizing the same objects with different colors, when the image to be processed, expressed using the target pixel feature value, is input into a convolutional neural network model for processing.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of image processing technology, and in particular to an image processing method, apparatus, storage medium, and program product. Background Technology

[0002] Convolutional Neural Networks (CNNs) are a class of feedforward neural networks that incorporate convolutional computations and have a deep structure. They are one of the representative algorithms in deep learning. CNNs have representation learning capabilities and can classify input information in a translation-invariant manner according to their hierarchical structure; therefore, they are also known as "translation-invariant artificial neural networks."

[0003] Convolutional neural networks (CNNs) are widely used in image processing and computer vision tasks. Their core building block, the convolutional layer, extracts local features such as edges and textures by sliding convolutional kernels across the input image. However, traditional convolutional layers perform poorly in recognizing objects of different scales and have limited effectiveness in recognizing the same objects with different colors. Summary of the Invention

[0004] This disclosure is made in view of the above-mentioned problems. This disclosure provides an image processing method, apparatus, storage medium, and program product.

[0005] According to a first aspect of this disclosure, an image processing method is provided, comprising:

[0006] Calculate the color difference of each pixel in the image to be processed relative to a reference pixel in the image to be processed;

[0007] Based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference, calculate the vector proportional magnitude of each pixel;

[0008] Based on the vector scale value and the color difference, the target pixel feature value of each pixel is calculated.

[0009] Furthermore, according to the image processing method of the first aspect of the present disclosure, calculating the vector proportional modulus of each pixel based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference includes:

[0010] Based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference, calculate the relative coordinates of each pixel relative to the pixel reference point;

[0011] Based on the relative coordinates and the two-dimensional coordinates, the vector scale magnitude of each pixel is calculated.

[0012] Furthermore, according to the image processing method described in the first aspect of the present disclosure, calculating the vector scale magnitude of each pixel based on the relative coordinates and the two-dimensional coordinates includes:

[0013] Calculate a first ratio of the x-coordinate in the two-dimensional coordinates to the x-coordinate in the relative coordinates, and calculate a second ratio of the y-coordinate in the two-dimensional coordinates to the y-coordinate in the relative coordinates;

[0014] Summing the squares of the first ratio and the second ratio yields the summation result.

[0015] The square root of the summation result is used to obtain the vector scale magnitude of each pixel.

[0016] Furthermore, according to the image processing method described in the first aspect of the present disclosure, calculating the target pixel feature value of each pixel based on the vector scale modulus and the color difference includes:

[0017] The target pixel feature value of each pixel is obtained by multiplying the vector scale value by the color difference.

[0018] Furthermore, according to the image processing method described in the first aspect of the present disclosure, calculating the color difference of each pixel in the image to be processed relative to a pixel reference point in the image to be processed includes:

[0019] Obtain the first color channel parameters of each pixel and the second color channel parameters of the pixel reference point;

[0020] The color difference is obtained by calculating the difference between the first color channel parameter and the second color channel parameter.

[0021] Furthermore, according to the image processing method of the first aspect of the present disclosure, after calculating the target pixel feature value of each pixel based on the vector scale modulus and the color difference, the method further includes:

[0022] Based on the target pixel feature value of each pixel, an image matrix of the image to be processed is generated;

[0023] The image matrix is ​​input into the convolutional neural network to extract image features from the image to be processed.

[0024] According to a second aspect of this disclosure, an image processing apparatus is provided, comprising:

[0025] The first calculation module is used to calculate the color difference of each pixel in the image to be processed relative to a pixel reference point in the image to be processed;

[0026] The second calculation module is used to calculate the vector proportional modulus of each pixel based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference;

[0027] The third calculation module is used to calculate the target pixel feature value of each pixel based on the vector scale value and the color difference.

[0028] According to a third aspect of this disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory, the processor executing the computer program to implement the steps of the method described in the first aspect.

[0029] According to a fourth aspect of this disclosure, a computer-readable storage medium is provided having a computer program / instructions stored thereon that, when executed by a processor, implements the steps of the method described in the first aspect.

[0030] According to a fifth aspect of this disclosure, a computer program product is provided, including a computer program / instructions that, when executed by a processor, implement the steps of the method described in the first aspect.

[0031] As will be described in detail below, an image processing method according to embodiments of the present disclosure includes calculating the color difference of each pixel in an image to be processed relative to a pixel reference point in the image to be processed; calculating the vector scale magnitude of each pixel based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference; and calculating the target pixel feature value of each pixel based on the vector scale magnitude and the color difference. By calculating the target pixel feature value of each pixel in the image to be processed relative to the pixel reference point and the vector scale magnitude of each pixel, the target pixel feature value of each pixel can be calculated. This can alleviate the problem of poor performance of traditional convolutional layers of convolutional neural networks in recognizing objects of different scales, as well as the problem of limited performance in recognizing the same objects with different colors, when the image to be processed, expressed by the target pixel feature value, is input into a convolutional neural network model for processing.

[0032] It should be understood that both the foregoing general description and the following detailed description are exemplary and intended to provide further illustration of the claimed technology. Attached Figure Description

[0033] The above and other objects, features, and advantages of this disclosure will become more apparent from the more detailed description of the embodiments thereof in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of this disclosure and form part of the specification. They are used together with the embodiments of this disclosure to explain the disclosure and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same components or steps.

[0034] Figure 1 This is a flowchart illustrating an image processing method according to an embodiment of the present disclosure.

[0035] Figure 2 This is a flowchart illustrating an image processing method according to an embodiment of the present disclosure.

[0036] Figure 3 This is a flowchart illustrating an image processing method according to an embodiment of the present disclosure.

[0037] Figure 4 This is a structural diagram illustrating an image processing apparatus according to an embodiment of the present disclosure.

[0038] Figure 5 This is a hardware block diagram illustrating an electronic device according to an embodiment of the present disclosure.

[0039] Figure 6 This is a schematic diagram illustrating a computer-readable storage medium according to an embodiment of the present disclosure. Detailed Implementation

[0040] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown in the accompanying drawings can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.

[0041] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0042] In this document, the term "and / or" merely describes a relationship, indicating that three relationships can exist. For example, A and / or B can represent three cases: A alone, A and B simultaneously, and B alone. Furthermore, the term "at least one" in this document means any combination of at least two of any one or more elements. For example, including at least one of A, B, and C can mean including any one or more elements selected from the set consisting of A, B, and C.

[0043] In related technologies, convolutional neural networks are widely used in image processing and computer vision tasks. Their core building block—the convolutional layer—extracts local features, such as edges and textures, by sliding convolutional kernels across the input image. However, traditional convolutional layers perform poorly in recognizing objects of different scales and have limited effectiveness in recognizing the same objects with different colors.

[0044] To alleviate the technical problems existing in related technologies, embodiments of this disclosure provide an image processing method, apparatus, storage medium, and program product. The method includes calculating the color difference of each pixel in an image to be processed relative to a pixel reference point in the image to be processed; calculating the vector scale magnitude of each pixel based on its two-dimensional coordinates in the image to be processed and the color difference; and calculating the target pixel feature value of each pixel based on the vector scale magnitude and the color difference. By calculating the target pixel feature value of each pixel in the image to be processed relative to the pixel reference point and the vector scale magnitude of each pixel, the target pixel feature value of each pixel is calculated. This alleviates the problem of poor performance of traditional convolutional layers in processing objects of different scales and the limited performance in recognizing the same objects with different colors when the image to be processed, expressed using the target pixel feature value, is input into a convolutional neural network model for processing.

[0045] To facilitate understanding of this embodiment, a detailed description of the image processing method disclosed in this disclosure will be provided first. The execution subject of the image processing method provided in this disclosure is generally an electronic device with certain computing capabilities, such as a terminal device, a server, or other processing devices. In some possible implementations, the image processing method can be implemented by a processor calling computer-readable instructions stored in memory.

[0046] See Figure 1 The diagram shown is a flowchart of an image processing method provided in an embodiment of this disclosure. The method includes the following steps:

[0047] Step 101: Calculate the color difference of each pixel in the image to be processed relative to the pixel reference point in the image to be processed.

[0048] In this embodiment, the image to be processed can be any image that can be processed by a convolutional neural network. For example, the image to be processed can be an image of an animal, an image of a plant, an image of a building, etc. This embodiment does not make any specific limitations.

[0049] In this embodiment, the pixel reference point can be pre-configured as any pixel in the image to be processed. For example, the pixel reference point can be set to the pixel at the upper left corner of the image to be processed, or the pixel reference point can be set to the pixel at the upper right corner of the image to be processed.

[0050] In some alternative embodiments, calculating the color difference of each pixel in the image to be processed relative to a reference pixel in the image to be processed may include the following steps:

[0051] Obtain the first color channel parameters of each pixel and the second color channel parameters of the pixel reference point;

[0052] Calculate the difference between the parameters of the first color channel and the parameters of the second color channel to obtain the color difference.

[0053] In this embodiment, the first color channel parameters and the second color channel parameters include, but are not limited to, red (R) channel parameters, green (G) channel parameters, and / or blue (B) channel parameters. It should be understood that the specific color channel parameters in the first and second color channel parameters are the same. For example, if the first color channel parameters include RGB color channel parameters, the second color channel parameters also include RGB color channel parameters. Similarly, if the first color channel parameters include RG color channel parameters, the second color channel parameters also include RG color channel parameters.

[0054] It should be understood that the differences between the corresponding parameters in the first and second color channel parameters constitute the color difference. For example, if the first color channel parameter includes RGB color channel parameters, and the second color channel parameter also includes RGB color channel parameters, then the difference between the first and second color channel parameters can be expressed as the difference between the R color channel parameters included in the first color channel parameter and the R color channel parameters included in the second color channel parameter, the difference between the G color channel parameters included in the first color channel parameter and the G color channel parameters included in the second color channel parameter, and the difference between the B color channel parameters included in the first color channel parameter and the B color channel parameters included in the second color channel parameter.

[0055] As an example, taking the top-left pixel in the image to be processed as the pixel reference point, the color difference is defined as the difference between the RGB value of each pixel and the RGB value of the top-left pixel. When expressed as a formula, the color difference can be represented as:

[0056] ΔR = Rij - R00;

[0057] ΔG = Gij - G00;

[0058] ΔB=Bij-B00.

[0059] Among them, R ij The R color channel parameters for each pixel, G ij The G color channel parameters for each pixel, B ijFor each pixel, R00 is the R color channel parameter, G00 is the G color channel parameter, and B00 is the B color channel parameter.

[0060] Step 102: Calculate the vector scale value of each pixel based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference.

[0061] In one or more embodiments, calculating the vector scale magnitude of each pixel based on its two-dimensional coordinates and color difference in the image to be processed may include:

[0062] Based on the two-dimensional coordinates and color difference of each pixel in the image to be processed, calculate the relative coordinates of each pixel relative to the pixel reference point;

[0063] The vector scale magnitude of each pixel is calculated based on relative coordinates and two-dimensional coordinates.

[0064] This embodiment includes, but is not limited to, using the np.indices tool to calculate the relative coordinates of each pixel relative to a pixel reference point. In practical applications, the two-dimensional coordinates and color difference of each pixel in the image to be processed are input into the np.indices tool, which outputs the relative coordinates of each pixel relative to the pixel reference point.

[0065] In one or more embodiments, calculating the vector scale magnitude of each pixel based on the relative coordinates and the two-dimensional coordinates may include the following steps:

[0066] Calculate the first ratio of the x-coordinate in two-dimensional coordinates to the x-coordinate in relative coordinates, and calculate the second ratio of the y-coordinate in two-dimensional coordinates to the y-coordinate in relative coordinates;

[0067] Summing the squares of the first ratio and the second ratio yields the summation result.

[0068] Take the square root of the summation result to obtain the vector scale magnitude of each pixel.

[0069] In applications, the calculation of the vector scale modulus can refer to the following formula:

[0070]

[0071] Where vector_proportion_matrix[i,j] is the vector proportion magnitude, i and j are the x and y coordinates in two-dimensional coordinates, respectively, and H and W are the x and y coordinates in relative coordinates, respectively.

[0072] Step 103: Calculate the target pixel feature value for each pixel based on the vector scale modulus and color difference.

[0073] In one or more embodiments, calculating the target pixel feature value for each pixel based on the vector scaling factor and color difference may include the following steps:

[0074] Calculate the product of the vector scale modulus and the color difference to obtain the target pixel feature value for each pixel.

[0075] When using formulas, the feature value of the target pixel can be expressed by the following formula:

[0076] new_value[i,j]=(ΔR,ΔG,ΔB)×vector_proportion_matrix[i,j];

[0077] Where new_value[i,j] is the target pixel feature value for each pixel, ΔR, ΔG, ΔB are the color differences, and vector_proportion_matrix[i,j] is the vector proportion magnitude.

[0078] In the solution provided in this embodiment, the target pixel feature value of each pixel is calculated by using the color difference of each pixel in the image to be processed relative to the pixel reference point and the vector scale magnitude of each pixel. In this way, when the image to be processed, expressed by the target pixel feature value, is input into the convolutional neural network model for processing, the problem that the traditional convolutional layer of the convolutional neural network is not effective in recognizing objects of different scales can be alleviated, as well as the problem that the effect is limited in recognizing the same objects with different colors can be alleviated.

[0079] This disclosure also provides an image processing method, such as... Figure 2 As shown, the method may include the following steps:

[0080] Step 201: Obtain the first color channel parameters of each pixel and the second color channel parameters of the pixel reference point;

[0081] Step 202: Calculate the difference between the parameters of the first color channel and the parameters of the second color channel to obtain the color difference;

[0082] Step 203: Based on the two-dimensional coordinates and color difference of each pixel in the image to be processed, calculate the relative coordinates of each pixel relative to the pixel reference point;

[0083] Step 204: Calculate the first ratio of the x-coordinate in the two-dimensional coordinate system to the x-coordinate in the relative coordinate system, and calculate the second ratio of the y-coordinate in the two-dimensional coordinate system to the y-coordinate in the relative coordinate system.

[0084] Step 205: Summate the squares of the first ratio and the squares of the second ratio to obtain the summation result;

[0085] Step 206: Take the square root of the summation result to obtain the vector scale magnitude of each pixel;

[0086] Step 207: Calculate the product of the vector scale modulus and the color difference to obtain the target pixel feature value for each pixel.

[0087] Step 208: Generate an image matrix of the image to be processed based on the target pixel feature value of each pixel;

[0088] Step 209: Input the image matrix into the convolutional neural network to extract image features of the image to be processed.

[0089] In the field of image preprocessing and convolutional neural network (CNN) enhancement, various technical solutions have been proposed and applied. The following are three main existing technical solutions:

[0090] 1. Multi-scale feature map technology

[0091] Multi-scale feature map techniques enhance a model's ability to recognize multi-scale objects by extracting features at different scales across different convolutional layers. Shallow convolutional layers typically extract low-level detail features, while deep convolutional layers extract high-level semantic features. Feature pyramid networks (FPNs) and feature hierarchies further enhance a model's ability to recognize multi-scale objects by merging feature maps from different scales.

[0092] 2. Data Augmentation Technology

[0093] Data augmentation techniques generate diverse training samples by scaling, rotating, and cropping images during training. This enables the model to recognize objects at different scales and from different perspectives, improving the model's generalization ability and robustness.

[0094] 3. Adaptive convolution kernel technique

[0095] Adaptive convolution kernel techniques enhance a model's feature extraction capabilities at different scales by using convolution kernels of varying sizes or deformable convolution. This approach allows the convolution kernel to dynamically adjust its shape and size based on the features of the input image, thereby better adapting to the needs of multi-scale object recognition.

[0096] The three related technologies mentioned above each have the following drawbacks:

[0097] 1. Disadvantages of multi-scale feature map techniques:

[0098] High computational complexity: Features need to be extracted at different levels and fused, which leads to a significant increase in computational complexity and storage requirements.

[0099] Feature redundancy: Feature maps at different levels may contain a lot of redundant information, which increases the difficulty of model training and inference time.

[0100] 2. Disadvantages of data augmentation techniques:

[0101] Manual design is complex: it requires designing multiple data augmentation strategies and conducting extensive experiments to verify their effectiveness.

[0102] Uncertainty: The effectiveness of data augmentation strategies is uncertain, and different augmentation methods do not necessarily improve model performance.

[0103] 3. Disadvantages of adaptive convolution kernel technology:

[0104] Complex implementation: The implementation of deformable convolutional kernels is complex, which increases the difficulty of training and deploying the model.

[0105] High computational overhead: Dynamically adjusting the shape and size of the convolution kernel increases computational overhead and affects the real-time performance of the model.

[0106] This public proposal presents a novel image preprocessing technique that combines color difference with relative position vector scaling, aiming to address the following issues:

[0107] 1. Improve the ability to recognize multi-scale objects:

[0108] By introducing the magnitude of the position vector ratio, the network can better capture features at different scales, overcoming the limitations of fixed-size convolutional kernels in multi-scale object recognition.

[0109] 2. Enhance the robustness of color changes:

[0110] Color difference calculation captures the common features between different colors. By combining these common features with the position vector ratio, the model can handle color changes more effectively and improve the robustness of recognizing objects of different colors.

[0111] 3. Improve recognition accuracy in cases of partial image loss:

[0112] By combining positional and chromatic aberration information, the model can accurately identify objects even when parts of the image are missing, thus enhancing its generalization ability and recognition accuracy.

[0113] In the specific implementation of the solution, such as Figure 3 As shown, the specific steps may include:

[0114] Step 301: Calculate the color difference.

[0115] First, for each pixel in the input image, calculate its color difference relative to the top-left origin (i.e., the pixel at position [0,0]). The color difference is defined as the difference between the pixel's RGB value and the origin's RGB value:

[0116] ΔR = Rij - R00;

[0117] ΔG = Gij - G00;

[0118] ΔB=Bij-B00.

[0119] Step 302: Calculate the magnitude of the relative position vector ratio.

[0120] Next, we calculate the magnitude of the vector scale of each pixel relative to the top-left origin. First, we use `np.indices` to generate a matrix of shape (H, W, 2) representing the coordinates of each pixel relative to the top-left origin. Then, we calculate the magnitude of the vector scale for each coordinate:

[0121]

[0122] Step 303: Calculate the new pixel feature values.

[0123] Multiply the color difference by the vector proportion matrix to obtain a new pixel feature value: new_balue[i,j]=(ΔR,ΔG,×B)×vector_proportion_matrix[i,j].

[0124] Compared with the aforementioned related technologies, the solution disclosed herein has the following advantages:

[0125] Comparison of multi-scale feature map techniques:

[0126] 1. Computational complexity:

[0127] Existing multi-scale feature map techniques require feature extraction and fusion at different levels, resulting in high computational complexity. This proposed solution, however, significantly reduces computational complexity through a simple preprocessing step: combining color difference and position vector scaling modulus.

[0128] 2. Feature redundancy:

[0129] Existing technologies may suffer from feature redundancy issues, while this method directly combines color difference and position information, simplifying the feature extraction process and reducing redundancy.

[0130] Comparison of data augmentation technologies:

[0131] 1. Complex manual design:

[0132] Data augmentation techniques require complex design and verification processes. This public proposal achieves multi-scale and color-robust augmentation through a unified preprocessing step, reducing design complexity.

[0133] 2. Uncertainty:

[0134] The effects of data augmentation are uncertain, but this method provides a deterministic and effective feature extraction mechanism by combining color difference and position vector ratio.

[0135] Comparison of adaptive convolution kernel techniques:

[0136] 1. Complex to implement:

[0137] Adaptive convolutional kernels are complex to implement, increasing the difficulty of model training and deployment. This public proposal achieves similar results through preprocessing without changing the convolutional kernel structure, simplifying the implementation process.

[0138] 2. Calculate the cost:

[0139] Dynamic adjustment of adaptive convolutional kernels increases computational overhead. The preprocessing method proposed in this disclosure is computationally simple, has low overhead, and is suitable for scenarios with high real-time requirements.

[0140] This disclosure also provides an image processing apparatus for performing the image processing method provided in any of the above embodiments. For example... Figure 4 As shown, the device includes:

[0141] The first calculation module 41 is used to calculate the color difference of each pixel in the image to be processed relative to a pixel reference point in the image to be processed;

[0142] The second calculation module 42 is used to calculate the vector proportional modulus of each pixel based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference;

[0143] The third calculation module 43 is used to calculate the target pixel feature value of each pixel based on the vector scale value and the color difference.

[0144] In one or more embodiments, the second computing module 42 is used for:

[0145] Based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference, calculate the relative coordinates of each pixel relative to the pixel reference point;

[0146] Based on the relative coordinates and the two-dimensional coordinates, the vector scale magnitude of each pixel is calculated.

[0147] In one or more embodiments, the second computing module 42 is used for:

[0148] Calculate a first ratio of the x-coordinate in the two-dimensional coordinates to the x-coordinate in the relative coordinates, and calculate a second ratio of the y-coordinate in the two-dimensional coordinates to the y-coordinate in the relative coordinates;

[0149] Summing the squares of the first ratio and the second ratio yields the summation result.

[0150] The square root of the summation result is used to obtain the vector scale magnitude of each pixel.

[0151] In one or more embodiments, the third computing module 43 is used for:

[0152] The target pixel feature value of each pixel is obtained by multiplying the vector scale value by the color difference.

[0153] In one or more embodiments, the first computing module 41 is used for:

[0154] Obtain the first color channel parameters of each pixel and the second color channel parameters of the pixel reference point;

[0155] The color difference is obtained by calculating the difference between the first color channel parameter and the second color channel parameter.

[0156] In one or more embodiments, the device is also used for:

[0157] Based on the vector scale modulus and the color difference, after calculating the target pixel feature value of each pixel, an image matrix of the image to be processed is generated based on the target pixel feature value of each pixel.

[0158] The image matrix is ​​input into the convolutional neural network to extract image features from the image to be processed.

[0159] The image processing apparatus and the image processing method provided in the embodiments of this disclosure are based on the same inventive concept and have the same beneficial effects as the methods they employ, operate, or implement.

[0160] This disclosure also provides an electronic device for performing the image processing method described above. Please refer to... Figure 5 It illustrates a schematic diagram of an electronic device provided by some embodiments of this disclosure. For example... Figure 5As shown, the electronic device 8 includes: a processor 800, a memory 801, a bus 802, and a communication interface 803. The processor 800, the communication interface 803, and the memory 801 are connected via the bus 802. The memory 801 stores a computer program that can run on the processor 800. When the processor 800 runs the computer program, it executes the image processing method provided in any of the foregoing embodiments of this disclosure.

[0161] The memory 801 may include high-speed random access memory (RAM) or non-volatile memory, such as at least one disk storage device. Communication between this device network element and at least one other network element is achieved through at least one communication interface 803 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.

[0162] Bus 802 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. The memory 801 is used to store programs. After receiving an execution instruction, the processor 800 executes the program. The image processing method disclosed in any of the foregoing embodiments of this disclosure can be applied to the processor 800, or implemented by the processor 800.

[0163] The processor 800 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of the processor 800 or by instructions in software form. The processor 800 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), etc.; it may also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this disclosure. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this disclosure can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 801. Processor 800 reads the information in memory 801 and, in conjunction with its hardware, completes the steps of the above method.

[0164] The electronic device provided in this disclosure and the image processing method provided in this disclosure are based on the same inventive concept and have the same beneficial effects as the methods they employ, operate, or implement.

[0165] This disclosure also provides a computer-readable storage medium corresponding to the image processing method provided in the foregoing embodiments. Please refer to... Figure 6 The computer-readable storage medium shown is an optical disc 30, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the image processing method provided in any of the foregoing embodiments.

[0166] It should be noted that examples of the computer-readable storage medium may also include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other optical and magnetic storage media, which will not be elaborated here.

[0167] The computer-readable storage medium provided in the above embodiments of this disclosure and the image processing method provided in the embodiments of this disclosure are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.

[0168] It should be noted that:

[0169] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of this disclosure may be practiced without these specific details. In some instances, well-known structures and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0170] Similarly, it should be understood that, in order to simplify this disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of this disclosure, various features of this disclosure are sometimes grouped together in a single embodiment, figure, or description thereof. However, this approach to disclosure should not be construed as reflecting a schematic diagram in which the claimed disclosure requires more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of this disclosure.

[0171] Furthermore, those skilled in the art will understand that although some embodiments described herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of this disclosure and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination.

[0172] The above description is merely a preferred embodiment of this disclosure, but the scope of protection of this disclosure is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this disclosure should be included within the scope of protection of this disclosure. Therefore, the scope of protection of this disclosure should be determined by the scope of the claims.

Claims

1. An image processing method, characterized in that, include: Calculate the color difference of each pixel in the image to be processed relative to a reference pixel in the image to be processed; Based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference, calculate the vector proportional magnitude of each pixel; Based on the vector scale value and the color difference, the target pixel feature value of each pixel is calculated; Based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference, the vector proportional magnitude of each pixel is calculated, including: Based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference, calculate the relative coordinates of each pixel relative to the pixel reference point; Based on the relative coordinates and the two-dimensional coordinates, calculate the vector scale magnitude of each pixel; Based on the relative coordinates and the two-dimensional coordinates, the vector scale magnitude of each pixel is calculated, including: Calculate a first ratio of the x-coordinate in the two-dimensional coordinates to the x-coordinate in the relative coordinates, and calculate a second ratio of the y-coordinate in the two-dimensional coordinates to the y-coordinate in the relative coordinates; Summing the squares of the first ratio and the second ratio yields the summation result. Take the square root of the summation result to obtain the vector scale magnitude of each pixel; Based on the vector scale modulus and the color difference, the target pixel feature value of each pixel is calculated, including: The target pixel feature value of each pixel is obtained by multiplying the vector scale value by the color difference.

2. The method according to claim 1, characterized in that, Calculating the color difference of each pixel in the image to be processed relative to a reference pixel in the image to be processed includes: Obtain the first color channel parameters of each pixel and the second color channel parameters of the pixel reference point; The color difference is obtained by calculating the difference between the first color channel parameter and the second color channel parameter.

3. The method according to claim 1, characterized in that, After calculating the target pixel feature value for each pixel based on the vector scale modulus and the color difference, the method further includes: Based on the target pixel feature value of each pixel, an image matrix of the image to be processed is generated; The image matrix is ​​input into the convolutional neural network to extract image features from the image to be processed.

4. An image processing apparatus, characterized in that, include: The first calculation module is used to calculate the color difference of each pixel in the image to be processed relative to a pixel reference point in the image to be processed; The second calculation module is used to calculate the vector proportional modulus of each pixel based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference; The third calculation module is used to calculate the target pixel feature value of each pixel based on the vector scale value and the color difference; The second calculation module is used for: Based on the two-dimensional coordinates of each pixel in the image to be processed and the color difference, calculate the relative coordinates of each pixel relative to the pixel reference point; Based on the relative coordinates and the two-dimensional coordinates, calculate the vector scale magnitude of each pixel; The second calculation module is used for: Calculate a first ratio of the x-coordinate in the two-dimensional coordinates to the x-coordinate in the relative coordinates, and calculate a second ratio of the y-coordinate in the two-dimensional coordinates to the y-coordinate in the relative coordinates; Summing the squares of the first ratio and the second ratio yields the summation result. Take the square root of the summation result to obtain the vector scale magnitude of each pixel; The first calculation module is used for: Obtain the first color channel parameters of each pixel and the second color channel parameters of the pixel reference point; The color difference is obtained by calculating the difference between the first color channel parameter and the second color channel parameter.

5. An electronic device, comprising a memory, a processor, and a computer program stored in the memory, characterized in that, The processor executes the computer program to implement the steps of the method according to any one of claims 1-3.

6. A computer-readable storage medium having a computer program / instructions stored thereon, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-3.

7. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-3.

Citation Information

Patent Citations

  • Visual tracking method based on super-pixel space-time significance segmentation

    CN110111338A

  • Airborne inclined remote sensing image building extraction method based on frame and image level annotation

    CN117593642A