An image processing method, apparatus, device and storage medium

By extracting and adjusting image regions in medical image processing, diverse and efficient image data can be generated, solving the problems of human dependence and false data risk in existing technologies and achieving efficient data augmentation.

CN113850784BActive Publication Date: 2026-03-03LENOVO (BEIJING) LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111135689.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-09-27
Publication Date
2026-03-03
Estimated Expiration
2041-09-27

AI Technical Summary

Technical Problem

Existing technologies in medical image processing require a large amount of manpower and domain knowledge. Generative adversarial networks (GANs) generate new data but risk overfitting to fake data, which affects timeliness.

Method used

By extracting the region of the object to be processed from the first image, determining the second image and adjusting its image parameters, generating the target image region and placing it in the designated area to form the third image, efficient data enhancement is achieved.

Benefits of technology

It can efficiently generate massive amounts of diverse image data, reduce reliance on human resources and domain knowledge, lower the risk of generating fake data, and improve data utilization.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113850784B_ABST
    Figure CN113850784B_ABST
Patent Text Reader

Abstract

The application discloses an image processing method and device, equipment and a storage medium, wherein the method comprises: in the acquired first image, extracting a to-be-processed image region where a to-be-processed object is located; determining a second image for attaching the to-be-processed image region; adjusting the image parameters of the to-be-processed image region based on the image parameters of the second image, to obtain a target image region; and placing the target image region in a specified region in the second image to obtain a third image; wherein the position of the first image where the to-be-processed image region is located is the same as or different from the position of the second image where the specified region is located.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing, and more particularly to an image processing method, apparatus, device, and storage medium. Background Technology

[0002] In related technologies, high-quality annotation requires significant human resources and domain knowledge, especially in the medical field. To improve data utilization, generative adversarial networks (GANs) are used to generate new data, which carries the risk of overfitting to "fake data"; at the same time, the computation is complex and affects timeliness. Summary of the Invention

[0003] In view of the above, embodiments of this application provide an image processing method, apparatus, device, and storage medium.

[0004] In a first aspect, embodiments of this application provide an image processing method, the method comprising:

[0005] In the first acquired image, extract the image region containing the object to be processed;

[0006] Determine a second image for attaching the region of the image to be processed;

[0007] Based on the image parameters of the second image, the image parameters of the image region to be processed are adjusted to obtain the target image region;

[0008] The target image region is placed within a specified area of ​​the second image to obtain a third image;

[0009] The location of the image region to be processed in the first image is the same as or different from the location of the specified region in the second image.

[0010] Secondly, embodiments of this application provide an image processing apparatus, the apparatus comprising:

[0011] The extraction module is used to extract the image region containing the object to be processed from the first acquired image.

[0012] The determining module is used to determine a second image for attaching the image region to be processed;

[0013] The adjustment module is used to adjust the image parameters of the image region to be processed based on the image parameters of the second image to obtain the target image region;

[0014] The processing module is used to place the target image region within a specified area of ​​the second image to obtain a third image;

[0015] The location of the image region to be processed in the first image is the same as or different from the location of the specified region in the second image.

[0016] Thirdly, embodiments of this application provide a computer device, including a memory and a processor. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements the steps in any of the image processing methods described in the embodiments of this application.

[0017] Fourthly, embodiments of this application provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the image processing methods described above.

[0018] In this embodiment, firstly, the image region containing the object to be processed is extracted from the acquired first image; secondly, a second image is determined for attaching the image region to be processed; thirdly, the image parameters of the image region to be processed are adjusted based on the image parameters of the second image to obtain a target image region; finally, the target image region is placed in a designated area within the second image to obtain a third image. Thus, by placing the adjusted image region to be processed in a designated area of ​​the second image, a large number of diverse third images can be efficiently generated based on the first image; that is, data enhancement can be efficiently performed. Attached Figure Description

[0019] Figure 1 This is a schematic diagram illustrating the implementation flow of an image processing method provided in an embodiment of the present invention;

[0020] Figure 2 This is a schematic diagram illustrating the implementation flow of an image processing method provided in an embodiment of the present invention;

[0021] Figure 3 This is a schematic diagram illustrating the implementation flow of an image processing method provided in an embodiment of the present invention;

[0022] Figure 4 This is a schematic diagram illustrating the implementation flow of an image processing method provided in an embodiment of the present invention;

[0023] Figure 5 This is a schematic diagram of the composition structure of an image processing device provided in an embodiment of the present invention;

[0024] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0025] It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit this application.

[0026] In the following description, the use of suffixes such as "module," "part," or "unit" to denote elements is solely for the purpose of illustration and has no specific meaning in itself. Therefore, "module," "part," or "unit" may be used interchangeably.

[0027] Electronic devices can be implemented in various forms. For example, the electronic devices described in this application may include mobile phones, tablet computers, laptops, handheld computers, personal digital assistants (PDAs), portable media players (PMPs), desktop computers, servers, etc.

[0028] The following description will use mobile electronic devices as an example. Those skilled in the art will understand that, in addition to components specifically designed for mobile purposes, the construction according to the embodiments of this application can also be applied to fixed-type electronic devices.

[0029] To facilitate understanding of the technical solutions of the embodiments of this application, the relevant technologies of the embodiments of this application will be described below.

[0030] Deep learning models have demonstrated exceptional performance in computer vision tasks, including medical image analysis. While deep learning is a widely used method, it requires a very large amount of well-labeled datasets to achieve consistent results. However, high-quality annotation requires significant human resources and domain knowledge, which is particularly costly in the medical field.

[0031] In related technologies, common methods to improve data utilization efficiency include semi-supervised learning, self-supervised pre-training, knowledge distillation, and data generation. However, using generative adversarial networks to generate new data carries the risk of overfitting to "fake data."

[0032] Therefore, the following technical solutions of the embodiments of this application are proposed. In order to understand the features and technical content of the embodiments of this application in more detail, the implementation of the embodiments of this application will be described in detail below with reference to the accompanying drawings. The accompanying drawings are for reference only and are not intended to limit the embodiments of this application.

[0033] This application provides an image processing method. Figure 1 This is a schematic diagram illustrating the implementation flow of an image processing method provided in an embodiment of this application, such as... Figure 1 As shown, the image processing method includes the following steps:

[0034] Step 101: In the first image obtained, extract the image region where the object to be processed is located.

[0035] In some embodiments, the first image may include at least one human organ, such as the left kidney, right kidney, left lung, right lung, liver, and / or gallbladder. This can be understood as the first image being a human organ image in a medical imaging study; where medical imaging refers to internal tissue images of the human body or a part of the human body obtained non-invasively.

[0036] In some embodiments, the object to be processed can be a lesion object in the first image, such as a tumor. Here, a capsule may be formed around the object to be processed, so that the object to be processed is clearly demarcated from normal tissue (such as human organs) in the first image.

[0037] In some embodiments, the image region containing the object to be processed can be extracted through the following process: First, select the image region containing the object to be processed; then, copy the image region containing the object to be processed. Taking the first image as the liver and the object to be processed as the tumor as an example: select the image region containing the tumor on the liver and copy the image region containing the tumor.

[0038] Step 102: Determine a second image for attaching the image region to be processed.

[0039] In some embodiments, attachment may be a part of the image area to be processed covering or pasting onto a second image; it can be understood as the positional relationship between tumors and human organs in medical images.

[0040] In some embodiments, the second image can be identical to the first image, including the object to which the image belongs (i.e., the human body corresponding to the image), image parameters, etc.; for example: the first image is an image of A's left kidney, and the second image is also an image of A's left kidney, with identical image parameters; the first image is an image of B's ​​left and right kidneys, and the second image is also an image of B's ​​left and right kidneys, with identical image parameters. It can be understood that the second image can be the same image as the first image; in this case, the image region of the object to be processed is extracted and attached within the image.

[0041] In some embodiments, the second image may be different from the first image; for example: the first image is an image of A's left kidney, and the second image is also an image of A's left kidney, but with different image parameters; the first image is an image of B's ​​left and right kidneys, and the second image is also an image of B's ​​left and right kidneys, but with different image parameters; the first image is an image of A's left kidney, and the second image is an image of A's right kidney; the first image is an image of A's liver, and the second image is an image of B's ​​liver and gallbladder. It can be understood that the second image may be different from the first image; in this case, the image region to be processed is extracted and attached across images.

[0042] Step 103: Based on the image parameters of the second image, adjust the image parameters of the image region to be processed to obtain the target image region.

[0043] In some embodiments, when the first image and the second image are the same, the image parameters of the first image and the second image can be the same or different; similarly, when the first image and the second image are different, the image parameters of the first image and the second image can be the same or different. Image parameters may include: image resolution, image size, image color, etc. Furthermore, if the first image and the second image belong to the same image (i.e., the first image and the second image are the same), the position of the image region to be processed in the first image is different from the position of the specified region in the second image; or, if the first image and the second image belong to different images (i.e., the first image and the second image are different), the position of the image region to be processed in the first image is the same as or different from the position of the specified region in the second image.

[0044] In some embodiments, when the first image and the second image are the same, and the image parameters of the first image and the second image are the same, the size and / or position of the image region to be processed can be transformed to obtain the target image.

[0045] In some embodiments, when the first image and the second image are the same, but the image parameters of the first image and the second image are different, the image parameters of the image region to be processed are adjusted based on the image parameters of the second image to obtain the target image, such that the image parameters of the image region to be processed are adapted to the image parameters of the second image. Furthermore, the image region to be processed can also undergo the aforementioned size and / or position transformations to obtain the target image; these will not be elaborated upon here.

[0046] In some embodiments, when the first image and the second image are different, and the image parameters of the first image and the second image are the same, the size and / or position of the image region to be processed can be transformed to obtain the target image; otherwise, the size and / or position of the image region to be processed may not be transformed.

[0047] In some embodiments, when the first image and the second image are different, but the image parameters of the first image and the second image are the same, the image parameters of the image region to be processed are adjusted based on the image parameters of the second image to obtain the target image, such that the image parameters of the image region to be processed match the image parameters of the second image. Furthermore, the image region to be processed can also be subjected to the aforementioned size and / or position transformations to obtain the target image; alternatively, the image region to be processed may not be adjusted, which will not be elaborated here. Step 104: Place the target image region within a specified area of ​​the second image to obtain the third image.

[0048] In some embodiments, the location of the image region to be processed in the first image is the same as or different from the location of the designated region in the second image.

[0049] In some embodiments, when the first image and the second image are identical, the position of the image region to be processed in the first image may be the same as or different from the position of the designated region in the second image. When the position of the image region to be processed in the first image is the same as the position of the designated region in the second image, the image region to be processed has been transformed (e.g., scaled, rotated, flipped, etc.). When the position of the image region to be processed in the first image is different from the position of the designated region in the second image, the image region to be processed may be transformed or not transformed; in a few cases, if the image parameters of the first image and the second image are different, the position of the first image region to be processed in the first image and the position of the designated region in the second image may also be the same.

[0050] In some embodiments, when the first image and the second image are different, the position of the image region to be processed in the first image may be the same as or different from the position of the designated region in the second image. When the position of the image region to be processed in the first image is the same as the position of the designated region in the second image, the image region to be processed may be transformed or not transformed. When the position of the image region to be processed in the first image is different from the position of the designated region in the second image, the image region to be processed may be transformed or not transformed. In rare cases, if the objects and image content of the first image and the second image are the same, and only the image angles are different, the position of the first image region to be processed in the first image may also be the same as the position of the designated region in the second image.

[0051] In some embodiments, the third image can be obtained by pasting the target image region onto a designated position in the second image.

[0052] In some embodiments, the first image and the second image are medical images, and the object to be processed is a lesion object in the medical image. Specifically, the first image and the second image are images of human organs in medical images, and the object to be processed is a lesion object attached to the first image in the medical image.

[0053] In this embodiment, firstly, the image region containing the object to be processed is extracted from the acquired first image; secondly, a second image is determined for attaching the image region to be processed; thirdly, the image parameters of the image region to be processed are adjusted based on the image parameters of the second image to obtain a target image region; finally, the target image region is placed in a designated area within the second image to obtain a third image. Thus, by placing the adjusted image region to be processed in a designated area of ​​the second image, a large number of diverse third images can be efficiently generated based on the first image; that is, data enhancement can be efficiently performed.

[0054] In some embodiments, the first image and the second image are labeled to obtain a first image and a second image with content tags and object tags. Then, based on the object tags and content tags of the first image, the second image is determined. Step 102 includes at least one of the following:

[0055] First, determine an image whose object label is the same as the object label of the first image and whose content label is the same as the first image, and designate it as the second image.

[0056] In some embodiments, the object label can be a label of the object to which the first image and the second image belong, and the content label can be a label of the image content contained in the first image and the second image. In this case, the image parameters of the first image and the second image can be the same or different. For example, if the image parameters of the first image and the second image are the same, and the first image is a medical image of A's left kidney, then the object label of the first image is A, and the content label of the first image is left kidney. The medical image with the same image parameters as the first image, and the object label is A, and the content label is left kidney is used as the second image. If the image parameters of the first image and the second image are different, and the first image is a medical image of B's ​​chest cavity, then the object label of the first image is B, and the content label of the first image is left lung, right lung, and heart. The image with different image parameters than the first image, and the object label is B, and the content label is left lung, right lung, and heart is used as the second image.

[0057] Second, determine an image whose object label is the same as the object label of the first image but whose content label is different from the first image, and designate it as the second image.

[0058] In some embodiments, for example: if the first image is a medical image of A's left kidney, then the object label of the first image is A, and the content label of the first image is left kidney; the medical image with the object label A and the content label right kidney is used as the second image; as another example: if the first image is a medical image of B's ​​chest cavity, then the object label of the first image is B, and the content labels of the first image are left lung, right lung, and heart; the image with the object label B and the content label left kidney is used as the second image.

[0059] Third, determine the image whose object label is different from the object label of the first image but whose content label is the same as the first image, and use it as the second image.

[0060] In some embodiments, for example: if the first image is a medical image of A's left kidney, then the object label of the first image is A, and the content label of the first image is left kidney; the medical image with object label B and content label left kidney is used as the second image; as another example: if the first image is a medical image of A's chest cavity, then the object label of the first image is A, and the content label of the first image is left lung, right lung, and heart; the image with object label B and content label left lung, right lung, and heart is used as the second image.

[0061] Fourth, determine an image whose object label is different from the object label of the first image and whose content label is different from the first image, and designate it as the second image.

[0062] In some embodiments, for example: if the first image is a medical image of A's left kidney, then the object label of the first image is A, and the content label of the first image is left kidney; and a medical image with the object label B and the content label liver is used as the second image; or, for example: if the first image is a medical image of A's chest cavity, then the object label of the first image is A, and the content labels of the first image are left lung, right lung, and heart; and an image with the object label B and the content label liver is used as the second image.

[0063] In this embodiment of the application, by annotating the first image and the second image, a first image and a second image with content tags and object tags are obtained; then, based on the object tags and content tags of the first image, the second image is determined; thus, a suitable and diverse second image can be obtained.

[0064] In some embodiments, a mapping relationship is established between the image parameters of the first image and the image parameters of the second image, so as to adjust the image parameters of the image region to be processed based on the mapping relationship; Figure 3 This is a schematic diagram illustrating the implementation flow of an image processing method provided in an embodiment of this application, such as... Figure 2 As shown, step 103 includes the following steps:

[0065] Step 201: Determine the mapping relationship between the image parameters of the first image and the second image.

[0066] In some embodiments, the mapping relationship can be determined by establishing a mapping relationship between the image parameters of the first image and the second image. Taking image parameters as image resolution, image size, and / or image color as an example, the mapping relationship is determined by establishing a mapping relationship between the image resolution, image size, and / or image color of the first image and the second image. Specifically, establishing the mapping relationship between the image resolution of the first image and the second image actually determines the number of pixels per unit length in the first image and the second image, generally in terms of the number of pixels per inch. Establishing the mapping relationship between the image size of the first image and the second image actually determines the number of pixels in the first image and the second image. Establishing the mapping relationship between the image color of the first image and the second image actually determines the pixel depth or color depth of the pixels in the first image and the second image.

[0067] Step 202: Based on the mapping relationship, adjust the image parameters of the image region to be processed to obtain the target image region.

[0068] In some embodiments, the image parameters of the image region to be processed are adjusted based on the mapping relationship to obtain the target image region. This can be achieved through the following process: First, the image parameters of the second image are determined based on the mapping relationship; second, the image parameters of the image region to be processed are adjusted based on the image parameters of the second image so that the image parameters of the image region to be processed match the image parameters of the second image, thereby obtaining the target image region.

[0069] In this embodiment of the application, by determining the mapping relationship between the image parameters of the first image and the second image, and then adjusting the image parameters of the image region to be processed based on the mapping relationship, the target image region is obtained, which can adjust the image region to be processed into a target image region that matches the image parameters of the second image.

[0070] In some embodiments, when the image parameters are different, different processing is performed on the image region to be processed. Step 202 includes the following steps:

[0071] Step 221: When the image parameters include image size, transform the size and / or position of the image region to be processed based on the mapping relationship to obtain the target image region.

[0072] In some embodiments, when the image parameters include image size, the image region to be processed can be spatially transformed based on the mapping relationship to obtain the target image region; for example, flipping, rotating, scaling, etc., which are not limited here.

[0073] Step 222: When the image parameters include image color, adjust the contrast of the image region to be processed based on the mapping relationship to enhance and / or reduce the contrast of the image region to be processed, thereby obtaining the target image region.

[0074] In some embodiments, when the image parameters include image color, a gamma transform can be performed on the image region to be processed based on a mapping relationship to obtain the target image region, thereby enhancing contrast and improving brightness diversity. Using a gamma transform allows the distribution of the image region to be processed to be adjusted while maintaining the overall brightness range. On the one hand, it increases the diversity of the image region to be processed through randomly sampled transform parameters; on the other hand, it improves the local contrast of the image region to be processed.

[0075] In some embodiments, gamma transform is used to adjust the contrast of overexposed or underexposed (too dark) grayscale images. Specifically, it involves using a non-linear transformation to enhance the grayscale values ​​of darker areas in the image and reduce the grayscale values ​​of areas with excessively high grayscale values. After gamma transform, the overall detail of the image is enhanced. The mathematical formula for gamma transform is as follows:

[0076] s=crγ

[0077] Where r is the input value of the grayscale image (the original grayscale value), and its value range is [0, 1]; s is the grayscale output value after gamma transformation; c is the grayscale scaling factor, which is usually 1; γ is the gamma factor, which controls the scaling degree of the entire transformation.

[0078] Step 223: Given that the image parameters include image resolution, based on the mapping relationship, reduce and / or increase the noise in the image region to be processed to obtain the target image region.

[0079] In some embodiments, when the image parameters include image resolution, the image region to be processed can be blurred based on the mapping relationship to obtain the target image region, so as to smooth the texture of the image region to be processed to a certain extent.

[0080] In some embodiments, Gaussian blur can be used to blur the image region to be processed. Gaussian blur, also known as Gaussian smoothing, is a widely used processing effect in image processing software such as Adobe Photoshop, GIMP, and Paint.NET. It is typically used to reduce image noise and reduce detail. The image generated by this blurring technique has a visual effect similar to viewing an image through frosted glass, which is significantly different from the bokeh effect of lens bokeh and the effect in shadows under normal lighting. Gaussian smoothing is also used in the preprocessing stage of computer vision algorithms to enhance the image effect at different scales (see scale-space representation and scale-space implementation). From a mathematical perspective, the Gaussian blurring process of an image is the convolution of the image with a normal distribution. Since the normal distribution is also called the Gaussian distribution, this technique is called Gaussian blur. Convolving the image with a circular box blur will produce a more accurate bokeh effect. Since the Fourier transform of the Gaussian function is another Gaussian function, Gaussian blur is a low-pass filter for the image.

[0081] In some embodiments, when the image parameters include two or more parameters, the order in which steps 221 to 223 are performed is not important; that is, when the image parameters include image size and image color, steps 221 and 222 can be performed in any order. When the image parameters include image color and image resolution, steps 222 and 223 can be performed in any order. When the image parameters include image size, image color, and image resolution, steps 221 to 223 can be performed in any order.

[0082] In this embodiment, when the image parameters include image size, the size and / or position of the image region to be processed is transformed based on the mapping relationship to obtain the target image region; when the image parameters include image color, the contrast of the image region to be processed is adjusted based on the mapping relationship to enhance and / or reduce the contrast of the image region to be processed to obtain the target image region; when the image parameters include image resolution, the noise of the image region to be processed is reduced and / or increased based on the mapping relationship to obtain the target image region; thus, the diversity of the target image region can be increased.

[0083] In some embodiments, the first image is annotated to identify objects to be processed in the first image; Figure 3 This is a schematic diagram illustrating the implementation flow of an image processing method provided in an embodiment of this application, such as... Figure 3 As shown, step 101 includes the following steps:

[0084] Step 301: Label the objects contained in the first image.

[0085] In some embodiments, the content contained in the first image is labeled; that is, the object to be processed in the first image and the objects to which the object to be processed are attached are labeled. It can be understood that the first image at least includes the object to be processed and the objects to which it is attached, such as: a tumor and the human organ to which it is attached, that is, a human organ and a tumor growing on it.

[0086] Step 302: In the first image, select objects whose labeled content tags match the target tags to obtain the objects to be processed.

[0087] In some embodiments, the target label can be a user-preset label used to match the first image containing the target label; thus, the first image obtained is the one that meets the requirements.

[0088] In some embodiments, in the first image, objects whose labeled object tags match the target tag are selected to obtain objects to be processed; for example, if the target tag is a tumor, in the first image, objects whose labeled object tags are tumors are selected, and the objects corresponding to that tag are determined as objects to be processed.

[0089] In this embodiment of the application, by labeling the objects contained in the first image, and then selecting the objects whose labels satisfy the target labels in the first image, the object to be processed is obtained; in this way, the region of the object to be processed in the first image can be quickly determined.

[0090] The following will describe an exemplary application of the embodiments of this application in a real-world application scenario, taking a medical image of a tumor as the object to be processed and a kidney as the first image as an example, to illustrate the image processing method; Figure 4 An image processing method provided in this application embodiment, such as Figure 4 As shown, the image processing method includes the following steps:

[0091] Step 401: Copy and paste the tumor image at the first scale.

[0092] In some embodiments, copying and pasting tumor images at a first ratio means: selecting a portion of images from the database at a first ratio, and performing the image processing procedure provided in the embodiments of this application on the selected portion of images.

[0093] Step 402: Randomly select a tumor image for replication.

[0094] In some embodiments, randomly selecting a tumor image for copying can be understood as copying the image region containing the tumor for separate image processing.

[0095] Step 403: Enhance the tumor image at a second scale.

[0096] In some embodiments, enhancing tumor images at a second ratio means selecting a subset of images from all tumor images at a second ratio and performing data enhancement on the selected subset of tumor images to maximize the diversity of tumor images.

[0097] Step 404: Select a suitable location to paste the tumor image to obtain the target image.

[0098] In some embodiments, selecting an appropriate location to paste the tumor image means pasting the enhanced tumor image onto a human organ.

[0099] Step 405: Perform data augmentation on the target image.

[0100] In some embodiments, steps 401 to 404 are actually object-level data augmentation. To further improve the diversity of data, image-level data augmentation can be performed on the target image.

[0101] Step 406: Train the neural network model using the data-augmented target image to obtain the trained neural network model.

[0102] In some embodiments, a neural network model is trained using the data-augmented target image to obtain a trained neural network model. Since the data-augmented target image is a massive and diverse dataset of tumor data, the trained neural network model can effectively identify tumors. In other words, the trained neural network model is used to identify tumor images in medical images.

[0103] Figure 5 This is a schematic diagram of the composition structure of an image processing device provided in an embodiment of this application, as shown below. Figure 5 As shown, the image processing apparatus 500 includes:

[0104] Extraction module 501 is used to extract the image region where the object to be processed is located in the acquired first image;

[0105] Determining module 502 is used to determine a second image for attaching the image region to be processed;

[0106] The adjustment module 503 is used to adjust the image parameters of the image region to be processed based on the image parameters of the second image to obtain the target image region;

[0107] The processing module 504 is used to place the target image region within a specified area of ​​the second image to obtain a third image.

[0108] In some embodiments, the location of the image region to be processed in the first image is the same as or different from the location of the designated region in the second image.

[0109] In some embodiments, the first image and the second image belong to the same image, and the location of the region to be processed in the first image is different from the location of the specified region in the second image; or...

[0110] The first image and the second image are different images, and the location of the image region to be processed in the first image is the same as or different from the location of the specified region in the second image.

[0111] In some embodiments, the determining module 502 includes at least one of the following:

[0112] The first determining submodule is used to determine an image whose object label is the same as the object label of the first image and whose content label is the same as the first image, as the second image;

[0113] The second determining submodule is used to determine an image whose object label is the same as the object label of the first image and whose content label is different from the first image, as the second image;

[0114] The third determining submodule is used to determine an image whose object label is different from the object label of the first image but whose content label is the same as the first image, and use it as the second image;

[0115] The fourth determining submodule is used to determine an image whose object label is different from the object label of the first image and whose content label is different from the first image, as the second image.

[0116] In some embodiments, the adjustment module 503 includes:

[0117] The fifth determining submodule is used to determine the mapping relationship between the image parameters of the first image and the second image;

[0118] The adjustment submodule is used to adjust the image parameters of the image region to be processed based on the mapping relationship to obtain the target image region.

[0119] In some embodiments, the image parameters include at least one of the following: image resolution, image size, and image color.

[0120] In some embodiments, the adjustment submodule includes:

[0121] The first adjustment submodule is used to transform the size and / or position of the image region to be processed based on the mapping relationship, when the image parameters include the image size, to obtain the target image region;

[0122] The second adjustment submodule is used to adjust the contrast of the image region to be processed based on the mapping relationship when the image parameters include image color, so as to enhance and / or reduce the contrast of the image region to be processed, and obtain the target image region.

[0123] The third adjustment submodule is used to reduce and / or increase the noise of the image region to be processed based on the mapping relationship, given that the image parameters include image resolution, to obtain the target image region.

[0124] In some embodiments, the extraction module 501 includes:

[0125] The annotation module is used to annotate the objects contained in the first image;

[0126] The matching module is used to select objects in the first image whose labeled object labels match the target label, thereby obtaining the object to be processed.

[0127] In some embodiments, the processing module 504 includes:

[0128] The pasting module is used to paste the target image region onto a specified position in the second image to obtain the third image.

[0129] In some embodiments, the first image and the second image are medical images, and the object to be processed is a lesion object in the medical image.

[0130] Figure 6 This application provides a schematic diagram of the structure of a computer device, as shown in the embodiment of the present application. Figure 6 As shown, the computer device 600 includes:

[0131] The system includes a memory 601 and a processor 602. The memory stores a computer program that can run on the processor. When the processor executes the program, it implements the steps of any of the image processing methods described in the embodiments of this application.

[0132] This application provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the steps of any of the image processing methods described above.

[0133] It should be noted that the aforementioned computer-readable storage media can be read-only memory (ROM), programmable read-only memory (PROM), erasable programmable read-only memory (EPROM), electrically erasable programmable read-only memory (EEPROM), magnetic random access memory (FRAM), flash memory, magnetic surface memory, optical disc, or compact disc read-only memory (CD-ROM), etc.; it can also be various processors that include one or any combination of the above-mentioned memories, such as mobile phones, computers, tablet devices, personal digital assistants, etc.

[0134] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0135] The sequence numbers of the above embodiments of the present invention are for descriptive purposes only and do not represent the superiority or inferiority of the embodiments.

[0136] Through the above description of the embodiments, those skilled in the art can clearly understand that the methods of the above embodiments can be implemented by means of software plus necessary general-purpose hardware platforms. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) and includes several instructions to cause a terminal device (which may be a mobile phone, computer, server, air conditioner, or network device, etc.) to execute the methods described in the various embodiments of the present invention.

[0137] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0138] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0139] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0140] The above are merely preferred embodiments of the present invention and do not limit the scope of the patent. Any equivalent structural or procedural transformations made based on the description and drawings of the present invention, or direct or indirect applications in other related technical fields, are similarly included within the scope of patent protection of the present invention.

Claims

1. An image processing method, the method comprising: In the first acquired image, extract the image region containing the object to be processed; The object to be processed is the lesion object in the first image; A second image is determined for attaching the image region to be processed; the first image and the second image are medical images; both the first image and the second image include at least one human organ; Determine the mapping relationship between the image parameters of the first image and the second image; Based on the mapping relationship, the image parameters of the image region to be processed are adjusted to obtain the target image region; The target image region is placed within a specified area of ​​the second image to obtain a third image; The first image and the second image belong to the same image, and the location of the image region to be processed in the first image is different from the location of the specified region in the second image; or, the first image and the second image belong to different images, and the location of the image region to be processed in the first image is the same as or different from the location of the specified region in the second image.

2. The method according to claim 1, wherein determining the second image for attaching the image region to be processed comprises at least one of the following: The image whose object label is the same as the object label of the first image and whose content label is the same as the first image is selected as the second image. The image whose object label is the same as the object label of the first image but whose content label is different from the first image is selected as the second image. The image whose object label is different from that of the first image but whose content label is the same as that of the first image is selected as the second image. The image whose object label is different from the object label of the first image and whose content label is different from the first image is selected as the second image.

3. The method according to claim 2, wherein the image parameters include at least one of the following: image resolution, image size, and image color.

4. The method according to claim 1, wherein adjusting the image parameters of the image region to be processed based on the mapping relationship to obtain the target image region includes: When the image parameters include image size, the size and / or position of the image region to be processed are transformed based on the mapping relationship to obtain the target image region; When the image parameters include image color, the contrast of the image region to be processed is adjusted based on the mapping relationship to enhance and / or reduce the contrast of the image region to be processed, thereby obtaining the target image region; When the image parameters include image resolution, the noise of the image region to be processed is reduced and / or increased based on the mapping relationship to obtain the target image region.

5. The method according to claim 1, wherein extracting the image region containing the object to be processed in the acquired first image comprises: The objects contained in the first image are labeled; In the first image, select objects whose labeled content tags match the target tags to obtain the objects to be processed.

6. The method according to any one of claims 1 to 4, wherein placing the target image region within the second image to obtain the third image comprises: The target image region is pasted onto the designated position of the second image to obtain the third image.

7. An image processing apparatus, the apparatus comprising: The extraction module is used to extract the image region containing the object to be processed from the first acquired image. The object to be processed is the lesion object in the first image; A determining module is configured to determine a second image for attaching to the image region to be processed; the first image and the second image are medical images; both the first image and the second image include at least one human organ; The adjustment module is used to determine the mapping relationship between the image parameters of the first image and the second image; Based on the mapping relationship, the image parameters of the image region to be processed are adjusted to obtain the target image region; The processing module is used to place the target image region within a specified area of ​​the second image to obtain a third image; The first image and the second image belong to the same image, and the location of the image region to be processed in the first image is different from the location of the specified region in the second image; or, the first image and the second image belong to different images, and the location of the image region to be processed in the first image is the same as or different from the location of the specified region in the second image.

Citation Information

Patent Citations

  • Foreground segmentation method and data enhancement method based on image synthesis

    CN111462164A

  • Image processing method and device

    CN112232385A