WO2024074060A1 - 图像调色方法、装置和存储介质 - Google Patents

图像调色方法、装置和存储介质 Download PDF

Info

Publication number
WO2024074060A1
WO2024074060A1 PCT/CN2023/102937 CN2023102937W WO2024074060A1 WO 2024074060 A1 WO2024074060 A1 WO 2024074060A1 CN 2023102937 W CN2023102937 W CN 2023102937W WO 2024074060 A1 WO2024074060 A1 WO 2024074060A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
region
interest
map
original image
Prior art date
Application number
PCT/CN2023/102937
Other languages
English (en)
French (fr)
Inventor
宗盖盖
马传旭
董付春
林晓丹
郭娟
Original Assignee
杭州群核信息技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 杭州群核信息技术有限公司 filed Critical 杭州群核信息技术有限公司
Publication of WO2024074060A1 publication Critical patent/WO2024074060A1/zh

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/90Dynamic range modification of images or parts thereof
    • G06T5/94Dynamic range modification of images or parts thereof based on local image properties, e.g. for local contrast enhancement
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/50Image enhancement or restoration using two or more images, e.g. averaging or subtraction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/90Determination of colour characteristics
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/25Determination of region of interest [ROI] or a volume of interest [VOI]
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/20Image preprocessing
    • G06V10/28Quantising the image, e.g. histogram thresholding for discrimination between background and foreground patterns
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10024Color image

Definitions

  • the present application relates to the field of image processing technology, and more specifically, to an image color adjustment method, device and storage medium.
  • An existing local color adjustment method includes: extracting a region of interest in an image by using a cutout software, adjusting the color of the region of interest, and aligning and overlaying the adjusted region of interest on the original image.
  • the user needs to manually cut out the image before color adjustment, and still needs to manually align the region of interest to the original image after color adjustment, which results in low color adjustment efficiency.
  • the purpose of the present application is to provide an image color adjustment method, device and storage medium to solve the problems existing in the prior art.
  • an embodiment of the present application provides an image color adjustment method, the method comprising:
  • a color-adjusted target image is generated according to the region of interest color adjustment map and the original image.
  • determining the region of interest according to the binary segmentation map and the superpixel segmentation map includes:
  • the region composed of super-pixel segments whose overlap reaches a preset threshold is determined as the region of interest.
  • generating a toned target image according to the region of interest toning map and the original image includes:
  • the region of interest color adjustment map and the original image are fused according to the transparent channel map to obtain a color-adjusted target image.
  • generating a trimap image of the region of interest includes:
  • the trimap image is obtained by performing image processing on the region of interest using a dilation and corrosion method and/or a skeleton extraction method.
  • generating a transparent channel image according to the trimap image and the original image includes:
  • the transparent channel map is obtained by calculating the trimap image and the original image through the alphaMatting algorithm, wherein the transparent channel map includes the transparency of each pixel in the original image.
  • the performing image fusion on the region of interest color adjustment map and the original image according to the transparent channel map to obtain a color-adjusted target image includes:
  • the pixel value of each pixel after fusion is calculated according to the pixel value of each pixel in the color adjustment image of the region of interest, the pixel value of each pixel in the original image and the transparency of each pixel in the transparent channel image.
  • the calculating the pixel value of each pixel after fusion according to the pixel value of each pixel in the color-adjusting image of the region of interest, the pixel value of each pixel in the original image, and the transparency of each pixel in the transparent channel image includes:
  • the fused pixel value at the pixel point the pixel value of the color-adjusting image of the region of interest * (1-alpha) + the pixel value of the original image * alpha;
  • alpha is the transparency at the pixel point.
  • the coloring of the region of interest to obtain a coloring map of the region of interest includes:
  • the preset parameter includes at least one of hue, saturation, brightness, contrast, and clarity;
  • the region of interest is adjusted according to the adjustment instruction to obtain a color adjustment map of the region of interest.
  • an image color adjustment device comprising a memory and a processor, the memory storing at least one program instruction, the processor implementing the method as described in the first aspect by loading and executing the at least one program instruction.
  • a computer storage medium wherein at least one program instruction is stored in the computer storage medium, and the at least one program instruction is loaded and executed by a processor to implement the method according to the first aspect.
  • the present application generates a trimap image of the area of interest according to the expansion and corrosion method and the skeleton extraction method, and then generates a transparent channel map according to the trimap image and the original image, thereby avoiding the boundary being misjudged as the background, improving the accuracy of the generated transparent channel map, and further improving the accuracy of the fused target image.
  • the present application performs image fusion according to the transparent channel map, solves the problem of excessive unnaturalness between the region of interest and other regions that have not been toned, and improves the image quality of the generated target image.
  • the present application uses two segmentation algorithms and combines the degree of overlap to jointly determine the region of interest, thereby improving the accuracy of the identified region of interest.
  • FIG1 is a method flow chart of an image color adjustment method provided by an embodiment of the present application.
  • FIG2 is a possible schematic diagram of an original image provided by an embodiment of the present application.
  • FIG3 is a superpixel segmentation map obtained after superpixel segmentation is performed on the original image shown in FIG2 , provided by one embodiment of the present application;
  • FIG4 is a possible schematic diagram of determining a region of interest after recognizing the original image shown in FIG2 according to an embodiment of the present application;
  • FIG5 is a trimap image obtained by performing image processing on the region of interest shown in FIG4 using a dilation and corrosion method according to an embodiment of the present application;
  • FIG6 is a trimap image obtained by performing image processing on the region of interest shown in FIG4 using a skeleton extraction method according to an embodiment of the present application;
  • FIG. 7 is a trimap image obtained by performing image processing on the region of interest shown in FIG. 4 using a dilation and corrosion method and a skeleton extraction method, provided in one embodiment of the present application.
  • the terms “installed”, “connected”, and “connected” should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components.
  • installed should be understood in a broad sense, for example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection or an electrical connection; it can be a direct connection, or it can be indirectly connected through an intermediate medium, or it can be the internal communication of two components.
  • FIG. 1 shows a method flow chart of an image color adjustment method provided by an embodiment of the present application. As shown in FIG. 1 , the method includes:
  • Step 101 receiving a trigger signal acting on an original image
  • the terminal can display the original image, and when the user needs to adjust the color of a part of the original image, the user can click on the original image.
  • the terminal can receive the trigger signal.
  • the trigger signal can be a click signal of clicking the original image with a mouse, or a touch signal of touching the original image with a touch screen, and there is no limitation on this.
  • the trigger signal may be a signal acting on the area to be adjusted in the original image.
  • FIG. 2 shows a possible schematic diagram of an original image displayed by a terminal.
  • Step 102 after receiving the trigger signal, segmenting the original image using an interactive segmentation algorithm to obtain a binary segmentation map
  • the original image After receiving the trigger signal, the original image can be segmented by an interactive segmentation algorithm to obtain the foreground and background in the original image.
  • Step 103 segmenting the original image using a superpixel segmentation algorithm to obtain a superpixel segmentation map
  • the original image can also be segmented by a superpixel segmentation algorithm to obtain a corresponding superpixel segmentation map.
  • a superpixel segmentation algorithm can be a SLIC (simple linear iterative clustering) algorithm.
  • step 102 and step 103 may also be executed simultaneously, or step 103 may be executed first and then step 102.
  • the present application does not limit this.
  • Step 104 determining a region of interest according to the binary segmentation map and the superpixel segmentation map
  • this step includes:
  • the overlap degree IOS refers to the intersection of the areas of If and S i divided by the area of S i , that is:
  • the region composed of super-pixel segments whose overlap reaches a preset threshold is determined as the region of interest.
  • the preset threshold value may be a pre-set value or a system default value, which is not limited in this application. Moreover, the specific value of the preset threshold value may be determined according to the actual application scenario. Typically, the preset threshold value is a value greater than 0.5. For example, in a possible embodiment, the preset threshold value is the system default value of 0.75.
  • the superpixel segmentation block can be determined as the foreground, otherwise, it is identified as the background.
  • the area composed of the final determined foregrounds is determined as the region of interest.
  • FIG4 shows a possible schematic diagram of the determined region of interest.
  • Step 105 adjusting the color of the region of interest to obtain a color adjustment map of the region of interest
  • this step may include:
  • the region of interest is adjusted according to the adjustment instruction to obtain a color adjustment map of the region of interest.
  • a double blur algorithm can be used to process the region of interest, and in actual implementation, the user can adjust the clarity by adjusting a button, wherein the adjustment button can be a slider, a slide bar, etc., which is not limited to this.
  • Step 106 Generate a toned target image according to the ROI toning map and the original image.
  • this step includes:
  • the trimap image is obtained by performing image processing on the region of interest using a dilation and corrosion method and/or a skeleton extraction method.
  • FIG. 5 shows a trimap image obtained after image processing is performed on the region of interest shown in FIG. 4 by using a dilation-erosion method.
  • FIG. 6 shows a trimap image obtained after image processing is performed on the region of interest shown in FIG. 4 using a skeleton extraction method.
  • the transparent channel map may be calculated based on the trimap image and the original image by using an alphaMatting algorithm, wherein the transparent channel map includes the transparency of each pixel in the original image.
  • the ROI color adjustment map and the original image are fused according to the transparent channel map to obtain a color-adjusted target image.
  • the pixel value of each pixel after fusion is calculated according to the pixel value of each pixel in the color adjustment image of the region of interest, the pixel value of each pixel in the original image and the transparency of each pixel in the transparent channel image.
  • the fused pixel value at the pixel point the pixel value of the color-adjusting image of the region of interest * (1-alpha) + the pixel value of the original image * alpha;
  • alpha is the transparency at the pixel point.
  • the fused target image After performing the above processing on each pixel, the fused target image can be obtained.
  • the original image is segmented by an interactive segmentation algorithm to obtain a binary segmentation map; the original image is segmented by a superpixel segmentation algorithm to obtain a superpixel segmentation map; the region of interest is determined according to the binary segmentation map and the superpixel segmentation map; the region of interest is toned to obtain a toned map of the region of interest; and a toned target image is generated according to the toned map of the region of interest and the original image.
  • the two segmentation algorithms can be used to automatically determine the region of interest and automatically perform image fusion, thus avoiding manual operation by users and improving the color adjustment efficiency.
  • the present application generates a trimap image of the area of interest according to the expansion and corrosion method and the skeleton extraction method, and then generates a transparent channel map according to the trimap image and the original image, thereby avoiding the boundary being misjudged as the background, improving the accuracy of the generated transparent channel map, and further improving the accuracy of the fused target image.
  • the present application performs image fusion according to the transparent channel map, solves the problem of excessive unnaturalness between the region of interest and other regions that have not been toned, and improves the image quality of the generated target image.
  • the present application uses two segmentation algorithms and combines the degree of overlap to jointly determine the region of interest, thereby improving the accuracy of the identified region of interest.
  • the present application also provides an image color adjustment device, which includes a memory and a processor.
  • the memory stores at least one program instruction
  • the processor implements the above method by loading and executing the at least one program instruction.
  • the present application also provides a computer storage medium, in which at least one program instruction is stored.
  • the at least one program instruction is loaded and executed by a processor to implement the method described above.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Multimedia (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

本申请提供了一种图像调色方法、装置和存储介质,涉及图像处理技术领域。所述方法包括:接收作用于原始图像中的触发信号;在接收到触发信号之后,通过交互式分割算法对原始图像进行分割,得到二值分割图;通过超像素分割算法对原始图像进行分割,得到超像素分割图;根据二值分割图和超像素分割图,确定感兴趣区域;对感兴趣区域进行调色,得到感兴趣区域调色图;根据感兴趣区域调色图和原始图像,生成调色后的目标图像。解决了现有技术中局部调色时调色效率较低的问题,达到了可以根据两种分割算法自动确定感兴趣区域,并自动进行图像融合,避免用户手动操作提高调色效率的效果。

Description

图像调色方法、装置和存储介质
本申请要求于2022年10月8日提交中国国家知识产权局、申请号为202211223095.4、申请名称为“图像调色方法、装置和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及图像处理技术领域,并且更加具体地,涉及一种图像调色方法、装置和存储介质。
背景技术
在诸多场景中,用户经常需要对图像进行调色,特别是对图像中的局部区域进行调色。
现有的一种局部调色方法包括:通过抠图软件抠取图像中的感兴趣区域,对感兴趣区域进行调色,将调色后的感兴趣区域对齐覆盖至原始图像中。
上述方案中,调色前用户需要人工抠图,调色后仍然需要人工将感兴趣区域对齐至原始图像,调色效率较低。
发明内容
本申请的目的在于提供一种图像调色方法、装置和存储介质,用于解决现有技术中存在的问题。
为达到上述目的,本申请提供如下技术方案:
根据第一方面,本申请实施例提供了一种图像调色方法,所述方法包括:
接收作用于原始图像中的触发信号;
在接收到所述触发信号之后,通过交互式分割算法对所述原始图像进行分割,得到二值分割图;
通过超像素分割算法对所述原始图像进行分割,得到超像素分割图;
根据所述二值分割图和所述超像素分割图,确定感兴趣区域;
对所述感兴趣区域进行调色,得到感兴趣区域调色图;
根据所述感兴趣区域调色图和所述原始图像,生成调色后的目标图像。
可选地,所述根据所述二值分割图和所述超像素分割图,确定感兴趣区域,包括:
计算所述二值分割图中的前景区域与所述超像素分割图中的各个超像素分割块的重合度;
将重合度达到预设阈值的各个超像素分割块组成的区域确定为所述感兴趣区域。
可选地,所述根据所述感兴趣区域调色图和所述原始图像,生成调色后的目标图像,包括:
生成所述感兴趣区域的trimap图像;
根据所述trimap图像和所述原始图像,生成透明通道图;
根据所述透明通道图对所述感兴趣区域调色图和所述原始图像进行图像融合,得到调色后的目标图像。
可选地,所述生成所述感兴趣区域的trimap图像,包括:
通过膨胀腐蚀方法和/或骨架提取方法对所述感兴趣区域进行图像处理,得到所述trimap图像。
可选地,所述根据所述trimap图像和所述原始图像,生成透明通道图,包括:
根据所述trimap图像和所述原始图像,通过alphaMatting抠图算法计算得到所述透明通道图,所述透明通道图中包括所述原始图像中的各个像素点处的透明度。
可选地,所述根据所述透明通道图对所述感兴趣区域调色图和所述原始图像进行图像融合,得到调色后的目标图像,包括:
根据所述感兴趣区域调色图中的各个像素点的像素值、所述原始图像中的各个像素点的像素值以及所述透明通道图中的各个像素点的透明度,计算融合后的各个像素点的像素值。
可选地,所述根据所述感兴趣区域调色图中的各个像素点的像素值、所述原始图像中的各个像素点的像素值以及所述透明通道图中的各个像素点的透明度,计算融合后的各个像素点的像素值,包括:
对于每个像素点,所述像素点处融合后的像素值=所述感兴趣区域调色图的像素值*(1-alpha)+所述原始图像的像素值*alpha;
其中,alpha为所述像素点处的透明度。
可选地,所述对所述感兴趣区域进行调色,得到感兴趣区域调色图,包括:
接收调节所述感兴趣区域的预设参数的调节指令,所述预设参数包括色相、饱和度、亮度、对比度和清晰度中的至少一种;
根据所述调节指令对所述感兴趣区域进行调节,得到所述感兴趣区域调色图。
第二方面,提供了一种图像调色装置,所述装置包括存储器和处理器,所述存储器中存储有至少一条程序指令,所述处理器通过加载并执行所述至少一条程序指令以实现如第一方面所述的方法。
第三方面,提供了一种计算机存储介质,所述计算机存储介质中存储有至少一条程序指令,所述至少一条程序指令被处理器加载并执行以实现如第一方面所述的方法。
通过接收作用于原始图像中的触发信号;在接收到触发信号之后,通过交互式分割算法对原始图像进行分割,得到二值分割图;通过超像素分割算法对原始图像进行分割,得到超像素分割图;根据二值分割图和超像素分割图,确定感兴趣区域;对感兴趣区域进行调色,得到感兴趣区域调色图;根据感兴趣区域调色图和原始图像,生成调色后的目标图像。解决了现有技术中局部调色时调色效率较低的问题,达到了可以根据两种分割算法自动确定感兴趣区域,并自动进行图像融合,避免用户手动操作提高调色效率的效果。
另外,本申请根据膨胀腐蚀方法和骨架提取方法生成感兴趣区域的trimap图像,进而根据trimap图像和原始图像生成透明通道图,避免了边界处被误判为背景,提高了生成得到的透明通道图的准确度,进而进一步提高融合得到目标图像的精度。
本申请根据透明通道图进行图像融合,解决了感兴趣区域与未调色的其他区域过度不自然的问题,提高了生成得到的目标图像的图像质量。
本申请通过两种分割算法并结合重合度共同确定感兴趣区域,提高了识别得到的感兴趣区域的准确度。
上述说明仅是本申请技术方案的概述,为了能够更清楚了解本申请的技术手段,并可依照说明书的内容予以实施,以下以本申请的较佳实施例并配合附图详细说明如后。
附图说明
图1为本申请一个实施例提供的图像调色方法的方法流程图;
图2为本申请一个实施例提供的原始图像的一种可能的示意图;
图3为本申请一个实施例提供的对图2所示的原始图像进行超像素分割之后得到的超像素分割图;
图4为本申请一个实施例提供的对图2所示的原始图像进行识别后确定得到感兴趣区域的一种可能的示意图;
图5为本申请一个实施例提供的通过膨胀腐蚀方法对图4所示的感兴趣区域进行图像处理后得到的trimap图像;
图6为本申请一个实施例提供的通过骨架提取方法对图4所示的感兴趣区域进行图像处理后得到的trimap图像;
图7为本申请一个实施例提供的通过膨胀腐蚀方法和骨架提取方法对图4所示的感兴趣区域进行图像处理后得到的trimap图像。
具体实施方式
下面将结合附图对本申请的技术方案进行清楚、完整地描述,显然,所描述的实施例是本申请一部分实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本申请保护的范围。
在本申请的描述中,需要说明的是,术语“中心”、“上”、“下”、“左”、“右”、“竖直”、“水平”、“内”、“外”等指示的方位或位置关系为基于附图所示的方位或位置关系,仅是为了便于描述本申请和简化描述,而不是指示或暗示所指的装置或元件必须具有特定的方位、以特定的方位构造和操作,因此不能理解为对本申请的限制。此外,术语“第一”、“第二”、“第三”仅用于描述目的,而不能理解为指示或暗示相对重要性。
在本申请的描述中,需要说明的是,除非另有明确的规定和限定,术语“安装”、“相连”、“连接”应做广义理解,例如,可以是固定连接,也可以是可拆卸连接,或一体地连接;可以是机械连接,也可以是电连接;可以是直接相连,也可以通过中间媒介间接相连,可以是两个元件内部的连通。对于本领域的普通技术人员而言,可以具体情况理解上述术语在本申请中的具体含义。
此外,下面所描述的本申请不同实施方式中所涉及的技术特征只要彼此之间未构成冲突就可以相互结合。
请参考图1,其示出了本申请一个实施例提供的图像调色方法的方法流程图,如图1所示,所述方法包括:
步骤101,接收作用于原始图像中的触发信号;
终端可以展示原始图像,在用户需要对原始图像进行局部调色时,用户可以点击原始图像。相应的,终端可以接收到该触发信号。其中,触发信号可以为通过鼠标点击原始图像的点击信号,也可以为通过触摸屏触摸原始图像的触摸信号,对此并不做限定。
可选地,触发信号可以为作用于原始图像中待调色区域的信号。
在一种可能的实施例中,请参考图2,其示出了终端展示的原始图像的一种可能的示意图。
步骤102,在接收到所述触发信号之后,通过交互式分割算法对所述原始图像进行分割,得到二值分割图;
在接收到触发信号之后,可以通过交互式分割算法对原始图像进行分割,得到原始图像中的前景和背景。
步骤103,通过超像素分割算法对所述原始图像进行分割,得到超像素分割图;
在接收到触发信号之后,还可以通过超像素分割算法对原始图像进行分割,得到对应的超像素分割图。比如,请参考图3,其示出了对图2所示的原始图像进行超像素分割之后得到的超像素分割图。其中,超像素分割算法可以为SLIC(simple linear iterativeclustering,简单的线性迭代聚类)算法。
需要说明的是,本申请仅以先执行步骤102后执行步骤103来举例说明,实际实现时,还可以同时执行步骤102和步骤103,或者先执行步骤103后执行步骤102,本申请对此并不做限定。
步骤104,根据所述二值分割图和所述超像素分割图,确定感兴趣区域;
可选地,本步骤包括:
第一,计算所述二值分割图中的前景区域与所述超像素分割图中的各个超像素分割块的重合度;
在一种可能的实施例中,基于交互式分割算法分割得到的前景区域If,超像素分割图中某个超像素块Si,则重合度IOS是指If与Si面积的交集除以Si的面积,也即:
第二,将重合度达到预设阈值的各个超像素分割块组成的区域确定为所述感兴趣区域。
预设阈值可以为预先设定的数值,也可以为系统默认的数值,本申请对此并不做限定。并且,预设阈值的具体取值可以根据实际应用场景进行确定。通常情况下,预设阈值为大于0.5的取值。比如,在一种可能的实施例中,预设阈值为系统默认的0.75。
实际实现时,若计算得到的重合度大于预设阈值,则说明其是前景的可能性很高,此时,可以将该超像素分割块确定为前景,反之,则识别为背景。将最终确定的各个前景所组成的区域确定为感兴趣区域。
仍然以原始图像为图2来举例说明,请参考图4,其示出了确定得到的感兴趣区域的一种可能的示意图。
步骤105,对所述感兴趣区域进行调色,得到感兴趣区域调色图;
可选地,本步骤可以包括:
第一,接收调节所述感兴趣区域的预设参数的调节指令,所述预设参数包括色相、饱和度、亮度、对比度和清晰度中的至少一种;
第二,根据所述调节指令对所述感兴趣区域进行调节,得到所述感兴趣区域调色图。
需要说明的是,在对感兴趣区域进行清晰度调色时,可以采用双重模糊算法对感兴趣区域进行处理,并且实际实现时用户可以通过调节按钮来调节清晰度。其中,调节按钮可以为滑块、滑条等等,对此并不做限定。
步骤106,根据所述感兴趣区域调色图和所述原始图像,生成调色后的目标图像。
可选地,本步骤包括:
第一,生成所述感兴趣区域的trimap图像;
通过膨胀腐蚀方法和/或骨架提取方法对所述感兴趣区域进行图像处理,得到所述trimap图像。
请参考图5,其示出了通过膨胀腐蚀方法对图4所示的感兴趣区域进行图像处理后得到的trimap图像。
请参考图6,其示出了通过骨架提取方法对图4所示的感兴趣区域进行图像处理后得到的trimap图像。
以上仅以分别使用膨胀腐蚀方法或者骨架提取方法进行图像处理来举例说明,请参考图7,其示出了对图4所示的感兴趣区域同时进行膨胀腐蚀方法处理和骨架提取方法处理后得到的trimap图像。通过使用膨胀腐蚀方法和骨架提取方法同时对感兴趣区域进行处理,避免了感兴趣区域与相邻区域边界处前景被误判为背景的问题,提高了生成得到的trimap图像的精度。
第二,根据所述trimap图像和所述原始图像,生成透明通道图;
可选地,可以根据所述trimap图像和所述原始图像,通过alphaMatting抠图算法计算得到所述透明通道图,所述透明通道图中包括所述原始图像中的各个像素点处的透明度。
第三,根据所述透明通道图对所述感兴趣区域调色图和所述原始图像进行图像融合,得到调色后的目标图像。
可选地,根据所述感兴趣区域调色图中的各个像素点的像素值、所述原始图像中的各个像素点的像素值以及所述透明通道图中的各个像素点的透明度,计算融合后的各个像素点的像素值。
也即:对于每个像素点,所述像素点处融合后的像素值=所述感兴趣区域调色图的像素值*(1-alpha)+所述原始图像的像素值*alpha;
其中,alpha为所述像素点处的透明度。
在对各个像素进行上述处理之后,即可得到融合后的目标图像。
综上所述,通过接收作用于原始图像中的触发信号;在接收到所述触发信号之后,通过交互式分割算法对所述原始图像进行分割,得到二值分割图;通过超像素分割算法对所述原始图像进行分割,得到超像素分割图;根据所述二值分割图和所述超像素分割图,确定感兴趣区域;对所述感兴趣区域进行调色,得到感兴趣区域调色图;根据所述感兴趣区域调色图和所述原始图像,生成调色后的目标图像。解决了现有技术中局部调色效率较低的问题。
综上所述,通过接收作用于原始图像中的触发信号;在接收到触发信号之后,通过交互式分割算法对原始图像进行分割,得到二值分割图;通过超像素分割算法对原始图像进行分割,得到超像素分割图;根据二值分割图和超像素分割图,确定感兴趣区域;对感兴趣区域进行调色,得到感兴趣区域调色图;根据感兴趣区域调色图和原始图像,生成调色后的目标图像。解决了现有技术 中局部调色时调色效率较低的问题,达到了可以根据两种分割算法自动确定感兴趣区域,并自动进行图像融合,避免用户手动操作提高调色效率的效果。
另外,本申请根据膨胀腐蚀方法和骨架提取方法生成感兴趣区域的trimap图像,进而根据trimap图像和原始图像生成透明通道图,避免了边界处被误判为背景,提高了生成得到的透明通道图的准确度,进而进一步提高融合得到目标图像的精度。
本申请根据透明通道图进行图像融合,解决了感兴趣区域与未调色的其他区域过度不自然的问题,提高了生成得到的目标图像的图像质量。
本申请通过两种分割算法并结合重合度共同确定感兴趣区域,提高了识别得到的感兴趣区域的准确度。
本申请还提供了一种图像调色装置,所述装置包括存储器和处理器,所述存储器中存储有至少一条程序指令,所述处理器通过加载并执行所述至少一条程序指令以实现如上所述的方法。
本申请还提供了一种计算机存储介质,所述计算机存储介质中存储有至少一条程序指令,所述至少一条程序指令被处理器加载并执行以实现如上所述的方法。
以上所述实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。

Claims (10)

  1. 一种图像调色方法,其特征在于,所述方法包括:
    接收作用于原始图像中的触发信号;
    在接收到所述触发信号之后,通过交互式分割算法对所述原始图像进行分割,得到二值分割图;
    通过超像素分割算法对所述原始图像进行分割,得到超像素分割图;
    根据所述二值分割图和所述超像素分割图,确定感兴趣区域;
    对所述感兴趣区域进行调色,得到感兴趣区域调色图;
    根据所述感兴趣区域调色图和所述原始图像,生成调色后的目标图像。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述二值分割图和所述超像素分割图,确定感兴趣区域,包括:
    计算所述二值分割图中的前景区域与所述超像素分割图中的各个超像素分割块的重合度;
    将重合度达到预设阈值的各个超像素分割块组成的区域确定为所述感兴趣区域。
  3. 根据权利要求1所述的方法,其特征在于,所述根据所述感兴趣区域调色图和所述原始图像,生成调色后的目标图像,包括:
    生成所述感兴趣区域的trimap图像;
    根据所述trimap图像和所述原始图像,生成透明通道图;
    根据所述透明通道图对所述感兴趣区域调色图和所述原始图像进行图像融合,得到调色后的目标图像。
  4. 根据权利要求3所述的方法,其特征在于,所述生成所述感兴趣区域的trimap图像,包括:
    通过膨胀腐蚀方法和/或骨架提取方法对所述感兴趣区域进行图像处理,得到所述trimap图像。
  5. 根据权利要求3所述的方法,其特征在于,所述根据所述trimap图像和所述原始图像,生成透明通道图,包括:
    根据所述trimap图像和所述原始图像,通过alphaMatting抠图算法计算得到所述透明通道图,所述透明通道图中包括所述原始图像中的各个像素点处的透明度。
  6. 根据权利要求3所述的方法,其特征在于,所述根据所述透明通道图对所述感兴趣区域调色图和所述原始图像进行图像融合,得到调色后的目标图像,包括:
    根据所述感兴趣区域调色图中的各个像素点的像素值、所述原始图像中的各个像素点的像素值以及所述透明通道图中的各个像素点的透明度,计算融合后的各个像素点的像素值。
  7. 根据权利要求6所述的方法,其特征在于,所述根据所述感兴趣区域调色图中的各个像素点的像素值、所述原始图像中的各个像素点的像素值以及所述透明通道图中的各个像素点的透明度,计算融合后的各个像素点的像素值,包括:
    对于每个像素点,所述像素点处融合后的像素值=所述感兴趣区域调色图的像素值*(1-alpha)+所述原始图像的像素值*alpha;
    其中,alpha为所述像素点处的透明度。
  8. 根据权利要求1至7任一所述的方法,其特征在于,所述对所述感兴趣区域进行调色,得到感兴趣区域调色图,包括:
    接收调节所述感兴趣区域的预设参数的调节指令,所述预设参数包括色相、饱和度、亮度、对比度和清晰度中的至少一种;
    根据所述调节指令对所述感兴趣区域进行调节,得到所述感兴趣区域调色图。
  9. 一种图像调色装置,其特征在于,所述装置包括存储器和处理器,所述存储器中存储有至少一条程序指令,所述处理器通过加载并执行所述至少一条程序指令以实现如权利要求1至8任一所述的方法。
  10. 一种计算机存储介质,其特征在于,所述计算机存储介质中存储有至少一条程序指令,所述至少一条程序指令被处理器加载并执行以实现如权利要求1至8任一所述的方法。
PCT/CN2023/102937 2022-10-08 2023-06-27 图像调色方法、装置和存储介质 WO2024074060A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211223095.4 2022-10-08
CN202211223095.4A CN115293996B (zh) 2022-10-08 2022-10-08 图像调色方法、装置和存储介质

Publications (1)

Publication Number Publication Date
WO2024074060A1 true WO2024074060A1 (zh) 2024-04-11

Family

ID=83833979

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/102937 WO2024074060A1 (zh) 2022-10-08 2023-06-27 图像调色方法、装置和存储介质

Country Status (2)

Country Link
CN (1) CN115293996B (zh)
WO (1) WO2024074060A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115293996B (zh) * 2022-10-08 2023-03-24 杭州群核信息技术有限公司 图像调色方法、装置和存储介质

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140301624A1 (en) * 2011-11-25 2014-10-09 Circle Cardiovascular Imaging Inc. Method for interactive threshold segmentation of medical images
CN108765428A (zh) * 2017-10-25 2018-11-06 江苏大学 一种基于点击交互的目标对象提取方法
CN110060197A (zh) * 2019-03-26 2019-07-26 浙江达峰科技有限公司 一种3d图像交互模块及处理方法
CN114187215A (zh) * 2021-11-17 2022-03-15 青海师范大学 基于图像分割的局部重着色算法
CN115293996A (zh) * 2022-10-08 2022-11-04 杭州群核信息技术有限公司 图像调色方法、装置和存储介质

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104732506B (zh) * 2015-03-27 2018-04-10 浙江大学 一种基于人脸语义分析的人物照片颜色风格转换方法
US10229340B2 (en) * 2016-02-24 2019-03-12 Kodak Alaris Inc. System and method for coarse-to-fine video object segmentation and re-composition
CN110969629B (zh) * 2019-10-30 2020-08-25 上海艾麒信息科技有限公司 基于超像素分割的交互式抠图系统、方法及装置
CN111815733A (zh) * 2020-08-07 2020-10-23 深兰科技(上海)有限公司 一种视频着色的方法及系统

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20140301624A1 (en) * 2011-11-25 2014-10-09 Circle Cardiovascular Imaging Inc. Method for interactive threshold segmentation of medical images
CN108765428A (zh) * 2017-10-25 2018-11-06 江苏大学 一种基于点击交互的目标对象提取方法
CN110060197A (zh) * 2019-03-26 2019-07-26 浙江达峰科技有限公司 一种3d图像交互模块及处理方法
CN114187215A (zh) * 2021-11-17 2022-03-15 青海师范大学 基于图像分割的局部重着色算法
CN115293996A (zh) * 2022-10-08 2022-11-04 杭州群核信息技术有限公司 图像调色方法、装置和存储介质

Also Published As

Publication number Publication date
CN115293996B (zh) 2023-03-24
CN115293996A (zh) 2022-11-04

Similar Documents

Publication Publication Date Title
US10915991B2 (en) Controlling smoothness of a transition between images
EP2803016B1 (en) Systems and methods for mobile image capture and processing
US10204432B2 (en) Methods and systems for color processing of digital images
US9052742B2 (en) Image processing apparatus and image processing method
CN108647351B (zh) 文本图像的处理方法、装置、存储介质及终端
WO2024074060A1 (zh) 图像调色方法、装置和存储介质
CN112241933A (zh) 人脸图像处理方法、装置、存储介质及电子设备
CN112135041B (zh) 一种人脸特效的处理方法及装置、存储介质
US11468549B2 (en) Eliminating image artifacts using image-layer snapshots
CN113034348A (zh) 图像处理方法、装置、存储介质及设备
CN111311528A (zh) 图像融合优化方法、装置、设备和介质
US9613288B2 (en) Automatically identifying and healing spots in images
CN115578278A (zh) 图像处理方法、装置、设备、计算机可读存储介质及产品
CN113395434B (zh) 一种预览图像虚化方法、存储介质及终端设备
CN111489418B (zh) 图像处理方法、装置、设备及计算机可读存储介质
CN112601029B (zh) 一种已知背景先验信息的视频分割方法、终端和存储介质
US9225876B2 (en) Method and apparatus for using an enlargement operation to reduce visually detected defects in an image
US20170372495A1 (en) Methods and systems for color processing of digital images
CN113056905B (zh) 用于拍摄类长焦图像的系统和方法
JP2021118522A (ja) 画像処理装置、画像処理方法、監視システム
CN110751653B (zh) 一种幻灯片中的图片处理方法和装置
WO2020107187A1 (en) Systems and methods for taking telephoto-like images
CN115423823A (zh) 图像处理方法及其装置
JP2016136325A (ja) 画像処理装置及びプログラム
CN115661179A (zh) 图像紫边检测方法和装置

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 23874252

Country of ref document: EP

Kind code of ref document: A1