WO2023284313A1 - Automatic slicing method and device for psd picture - Google Patents

Automatic slicing method and device for psd picture Download PDF

Info

Publication number
WO2023284313A1
WO2023284313A1 PCT/CN2022/080388 CN2022080388W WO2023284313A1 WO 2023284313 A1 WO2023284313 A1 WO 2023284313A1 CN 2022080388 W CN2022080388 W CN 2022080388W WO 2023284313 A1 WO2023284313 A1 WO 2023284313A1
Authority
WO
WIPO (PCT)
Prior art keywords
psd
picture
foreground
background
distribution information
Prior art date
Application number
PCT/CN2022/080388
Other languages
French (fr)
Chinese (zh)
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 WO2023284313A1 publication Critical patent/WO2023284313A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/70Denoising; Smoothing
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/73Deblurring; Sharpening
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/194Segmentation; Edge detection involving foreground-background segmentation

Definitions

  • the present disclosure relates generally to the field of computer technology. More specifically, the present disclosure relates to a method and device for automatically slicing PSD pictures.
  • the first is to split the PSD image files into slices with the same height regardless of the visual structure design of the PSD image file; the second is to split the PSD image file into Use the agreed directory structure and layer file naming in , identify the slice range, and then divide the document according to the area framed by the slice.
  • the PSD file is simply sliced equally, and the segmented document area will generally destroy the visual design division in the original PSD image file, such as splitting a visually complete object into In the upper and lower slices; Structural conventions and layer naming marks are carried out on the PSD document to identify the slice range.
  • the solutions of the present disclosure provide a method and device for automatically slicing PSD pictures.
  • the present disclosure provides a method for automatically slicing a PSD picture, wherein the method includes: acquiring the PSD picture; performing binarization processing on the PSD picture, and determining the foreground and background; extract the distribution information of the foreground and the background through an image segmentation algorithm; slice the PSD picture according to the distribution information of the foreground and the background.
  • performing binarization processing on the PSD picture, and determining the foreground and background in the PSD picture include: performing preprocessing on the PSD picture; performing binarization processing on the preprocessed PSD picture to determine the foreground and background in the PSD picture.
  • the preprocessing of the PSD picture includes: performing grayscale processing on the PSD picture; performing noise reduction and sharpening processing on the grayscale processed PSD picture.
  • the grayscale processing of the PSD picture includes: taking the average value of the red, yellow and blue values of each pixel in the PSD picture as the grayscale value of each pixel after grayscale. value, or the sum of the red, yellow and blue values of each pixel in the PSD image multiplied by different coefficients as the gray value of each pixel after graying.
  • the denoising and sharpening processing of the grayscaled PSD picture includes: performing noise reduction on the grayscaled PSD picture through Gaussian filtering, and performing high pass filtering on the grayscaled PSD picture PSD images are sharpened.
  • performing binarization processing on the preprocessed PSD picture, and determining the foreground and background in the PSD picture include: obtaining the binarization threshold of the preprocessed PSD picture through the Otsu algorithm; according to the The binarization threshold performs binarization processing on the preprocessed PSD picture.
  • the extracting the distribution information of the foreground and the background through an image segmentation algorithm includes: obtaining the distribution information of the foreground and the background through a projection cutting algorithm.
  • the distribution information is upper and lower boundary lines between the foreground and the background obtained through progressive scanning.
  • the slicing the PSD picture according to the distribution information of the foreground and the background includes: determining a cutting line of the PSD picture according to the distribution information of the foreground and the background; A cutting line cuts out the foreground to slice the PSD picture.
  • the present disclosure provides an automatic slicing device for a PSD picture, wherein the device includes: an acquisition module configured to acquire the PSD picture; a processing module configured to process the PSD picture The PSD picture is binarized to determine the foreground and background in the PSD picture; the extraction module is configured to extract the distribution information of the foreground and the background through an image segmentation algorithm; the slicing module is configured Slicing the PSD picture is used to slice the PSD picture according to the distribution information of the foreground and the background.
  • the processing module is configured to perform binarization processing on the PSD picture in the following manner to determine the foreground and background in the PSD picture: preprocessing the PSD picture; The image is binarized to determine the foreground and background in the PSD image.
  • the processing module is configured to preprocess the PSD picture in the following manner: perform grayscale processing on the PSD picture; perform noise reduction and sharpening processing on the grayscale processed PSD picture.
  • the processing module is configured to perform grayscale processing on the PSD picture in the following manner: taking the average value of the red, yellow and blue values of each pixel in the PSD picture as the respective values of each pixel The grayscale value after grayscale, or the sum of the red, yellow, and blue color values of each pixel in the PSD image multiplied by different coefficients as the grayscale value of each pixel after grayscale .
  • the processing module is used to perform denoising and sharpening processing on the grayscaled PSD picture in the following manner: denoise the grayscaled PSD picture through Gaussian filtering, and denoise the grayscaled PSD picture through high-pass filtering.
  • the grayscaled PSD image is sharpened.
  • the processing module is used to perform binarization processing on the preprocessed PSD picture in the following manner to determine the foreground and background in the PSD picture: Obtain the binary value of the preprocessed PSD picture by the Otsu algorithm threshold; according to the binarization threshold, the preprocessed PSD picture is binarized.
  • the extraction module is configured to extract the distribution information of the foreground and the background through an image segmentation algorithm in the following manner: obtain the distribution information of the foreground and the background through a projection cutting algorithm.
  • the distribution information is upper and lower boundary lines between the foreground and the background obtained through progressive scanning.
  • the slicing module is configured to slice the PSD picture according to the distribution information of the foreground and the background in the following manner: determine the PSD picture according to the distribution information of the foreground and the background Cutting line: Cut out the foreground according to the cutting line, so as to slice the PSD picture.
  • the present disclosure provides a device for automatically slicing PSD pictures, wherein the device includes a memory and a processor, a computer program is stored in the memory, and when the processor executes the computer program , implementing the above-mentioned method of the first aspect of the present disclosure.
  • the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed, implements the above-mentioned method of the first aspect of the present disclosure.
  • the automatic slicing of PSD pictures can be realized without relying on the PSD document structured directory and layer naming, and the slicing can maintain the relationship between visual elements and will not be disassembled. Divide into different canvases, so as to ensure the integrity of the visual design relationship of PSD pictures, and at the same time reduce the complexity of using PSD pictures and the cost of designers.
  • FIG. 1 is a flow chart illustrating an automatic slicing method of a PSD picture according to an embodiment of the present disclosure
  • Fig. 2 is a schematic block diagram illustrating an automatic slicing device for a PSD picture according to an embodiment of the present disclosure.
  • FIG. 1 is a flowchart illustrating an automatic slicing method of a PSD picture according to an embodiment of the present disclosure.
  • the method includes the following steps S101-S104.
  • Step S101 Acquiring the PSD picture.
  • Step S102 Perform binarization processing on the PSD picture, and determine the foreground and background in the PSD picture.
  • Step S103 extracting the distribution information of the foreground and the background through an image segmentation algorithm.
  • Step S104 slice the PSD picture according to the distribution information of the foreground and the background.
  • step S101 the PSD picture may be acquired.
  • the PSD picture to be sliced should first be acquired.
  • the PSD image can be obtained through any appropriate means, for example, it can be from a gallery, specially designed by a designer, and so on.
  • the PSD picture may be binarized to determine the foreground and background in the PSD picture.
  • the foreground and the background in the PSD picture may be determined by means of binarization processing.
  • the foreground refers to the object being targeted or to be used in the picture.
  • the background refers to the area in the picture other than the foreground.
  • performing binarization processing on the PSD picture and determining the foreground and background in the PSD picture may include: performing preprocessing on the PSD picture; performing binarization processing on the preprocessed PSD picture to determine the foreground and background in the PSD picture.
  • the PSD picture before binarizing the PSD picture, it is necessary to perform preprocessing on the PSD picture, so as to realize the binarization process or have a better effect after the binarization process.
  • the preprocessing of the PSD picture may include: performing grayscale processing on the PSD picture; performing noise reduction and sharpening processing on the grayscale processed PSD picture.
  • the PSD image is first grayscaled so as to obtain a grayscale image.
  • the grayscale processing of the PSD picture may include: taking the average value of the red, yellow and blue values of each pixel in the PSD picture as the grayscale value of each pixel after grayscale, Alternatively, the sum of the red, yellow and blue values of each pixel in the PSD image multiplied by different coefficients is used as the gray value of each pixel after graying.
  • the gray value of each pixel after graying can be equal to the average value of the red, yellow, and blue values of the pixel before graying, or the gray value of each pixel after graying
  • the grayscale value may also be equal to the sum of the values of red, yellow, and blue colors before the grayscale of the pixel is multiplied by different coefficients.
  • the present disclosure may adopt any suitable grayscale method, which is not limited here.
  • the denoising and sharpening processing of the grayscaled PSD picture may include: performing noise reduction on the grayscaled PSD picture through Gaussian filtering, and performing high pass filtering on the grayscaled PSD picture.
  • the image is sharpened.
  • Noise reduction can be implemented by using any applicable noise reduction algorithm such as Gaussian filtering
  • sharpening can be implemented by using any applicable sharpening algorithm such as high-pass filtering.
  • Image quality can be improved through noise reduction and sharpening.
  • performing preprocessing on the PSD picture may also include only performing grayscale processing on the PSD picture.
  • the PSD image obtained after binarization processing can satisfy applications that do not require high image quality.
  • binarization processing may be performed so as to determine the foreground and background in the PSD picture. More specifically, said performing binarization processing on the preprocessed PSD picture, and determining the foreground and background in the PSD picture may include: obtaining the binarization threshold of the preprocessed PSD picture through the Otsu algorithm; The binarization threshold is used to perform binarization processing on the preprocessed PSD picture.
  • the binarization threshold can be obtained through the Otsu algorithm.
  • the Otsu algorithm assumes that the picture includes two types of pixels, namely, foreground pixels and background pixels, and calculates the best threshold that can separate the two types of pixels, that is, the binarization threshold.
  • the preprocessed PSD picture can be binarized to obtain a black and white picture, and the black and white parts in the black and white picture represent the foreground part and the background part respectively.
  • black can be set as the background part and white can be set as the foreground part.
  • white can be set as the background part and black can be set as the foreground part according to the needs.
  • the preprocessed PSD picture can also be binarized by any other applicable algorithm, as long as the foreground and background of the picture can be distinguished.
  • step S103 distribution information of the foreground and the background may be extracted through an image segmentation algorithm.
  • the distribution information of the foreground and the background can be extracted through an image segmentation algorithm.
  • the distribution information may include the coordinates, size and the like of the boundary line between the foreground and the background.
  • the extracting the distribution information of the foreground and the background through an image segmentation algorithm may include: obtaining the distribution information of the foreground and the background through a projection cutting algorithm.
  • the black-and-white picture obtained above can be scanned line by line through the projection cutting algorithm, so that the distribution of foreground (such as white part) and background (such as black part) can be determined according to the pixel grayscale (black or white) information.
  • the distribution information may be, for example, upper and lower boundary lines between the foreground and the background obtained through progressive scanning.
  • the upper and lower boundary lines are horizontal boundary lines that run through the entire picture, that is, when the picture is scanned line by line, there are no foreground pixels (white pixels) in the current pixel line and there are foreground pixels in the previous pixel line , then the current pixel row can be used as the lower boundary line; when there are foreground pixels (white pixels) in the current pixel row and there is no foreground pixel in the previous pixel row, the current pixel row can be used as the upper boundary line.
  • the distribution information of foreground and background can also be extracted by any other applicable image segmentation algorithm.
  • the PSD picture may be sliced according to the distribution information of the foreground and the background.
  • the foreground after obtaining the distribution information of the foreground and the background, the foreground can be segmented from the background without destroying the integrity of the foreground.
  • the slicing the PSD picture according to the distribution information of the foreground and the background includes: determining the cutting line of the PSD picture according to the distribution information of the foreground and the background; line to cut out the foreground to slice the PSD picture.
  • the cutting line may be determined according to the distribution information of the foreground and the background, such as the above-mentioned boundary line. Specifically, in the case where there are multiple upper and lower boundary lines (in the case of multiple foregrounds), a line can be taken between adjacent upper and lower boundary lines without foreground pixels in the middle, so that the line is consistent with the upper and lower boundary lines.
  • the lower boundary line is parallel and spaced the same distance from the upper and lower boundary lines, and this line can be used as a cutting line.
  • the upper boundary line For the uppermost upper boundary line (corresponding to the uppermost foreground), there is no adjacent lower boundary line above it (there is no foreground above it), so the upper boundary line above the upper boundary line can be separated from the upper boundary line by a predetermined distance.
  • the number of rows of pixels be used as cutting lines.
  • the lower boundary line located at the bottom there is no upper boundary line adjacent to it below it (there is no foreground below it), so the distance between the lower boundary line and the lower boundary line can be preset. number of pixel rows as cutting lines. In the case that there are multiple cutting lines, the PSD picture is cut horizontally (horizontally) along the cutting lines to cut out the foreground, so as to realize the slicing of the PSD picture.
  • each slice may contain multiple foregrounds, especially when multiple foregrounds are arranged in a horizontal (horizontal) direction (at least one same pixel row passes through multiple foregrounds), the above-mentioned cutting line will Multiple foregrounds are sandwiched in it.
  • the black and white pictures obtained above can also be scanned column by column through the projection cutting algorithm to obtain the left and right boundary lines, and then determine the cutting line through the left and right boundary lines, and finally Cut through the cutting line longitudinally (perpendicularly), so as to realize the slicing of the PSD picture.
  • the present disclosure also provides an automatic slicing device for PSD pictures.
  • the device is used to execute the steps in the embodiment of the method for automatically slicing PSD pictures described above in conjunction with FIG. 1 .
  • FIG. 2 is a schematic block diagram illustrating an automatic slicing apparatus 100 for PSD pictures according to an embodiment of the present disclosure.
  • the apparatus 100 includes an acquisition module 101 , a processing module 102 , an extraction module 103 and a slicing module 104 .
  • the obtaining module 101 is configured to obtain the PSD picture.
  • the processing module 102 is configured to perform binarization processing on the PSD picture, and determine the foreground and background in the PSD picture.
  • the extraction module 103 is configured to extract the distribution information of the foreground and the background through an image segmentation algorithm.
  • the slicing module 104 is configured to slice the PSD picture according to the distribution information of the foreground and the background.
  • the processing module 102 is configured to perform binarization processing on the PSD picture in the following manner to determine the foreground and background in the PSD picture: preprocessing the PSD picture; The processed PSD picture is subjected to binarization processing to determine the foreground and background in the PSD picture.
  • the processing module 102 is configured to preprocess the PSD picture in the following manner: perform grayscale processing on the PSD picture; perform noise reduction and Sharpening.
  • the processing module 102 is configured to grayscale the PSD picture in the following manner: take the average value of the red, yellow and blue values of each pixel in the PSD picture as The grayscale value of each pixel after grayscale, or the sum of the red, yellow and blue color values of each pixel in the PSD image multiplied by different coefficients as the grayscale value of each pixel gray value of .
  • the processing module 102 is configured to perform noise reduction and sharpening processing on the grayscaled PSD picture in the following manner: denoise the grayscaled PSD picture by Gaussian filtering, The gray-scaled PSD image is sharpened by high-pass filtering.
  • the processing module 102 is configured to perform binarization processing on the preprocessed PSD picture in the following manner to determine the foreground and background in the PSD picture: Obtain the preprocessed PSD through the Otsu algorithm The binarization threshold of the picture; performing binarization processing on the preprocessed PSD picture according to the binarization threshold.
  • the extraction module 103 is configured to extract the distribution information of the foreground and the background through an image segmentation algorithm in the following manner: obtain the distribution information of the foreground and the background through a projection cutting algorithm.
  • the distribution information is upper and lower boundary lines between the foreground and the background obtained by progressive scanning.
  • the slicing module 104 is configured to slice the PSD picture according to the distribution information of the foreground and the background in the following manner: determine the PSD picture according to the distribution information of the background Cutting line: cutting out the foreground according to the distribution information of the foreground and the cutting line, so as to slice the PSD picture.
  • An embodiment of the present disclosure also provides a device for generating a page component, wherein the device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: obtaining the Described PSD picture; Carry out binarization process to described PSD picture, determine the foreground and background in the described PSD picture; Extract the distribution information of described foreground and described background by image segmentation algorithm; According to described foreground and described background The distribution information of the PSD picture is sliced.
  • the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed, the following steps are implemented: acquiring the PSD picture; The picture is binarized to determine the foreground and background in the PSD picture; the distribution information of the foreground and the background is extracted by an image segmentation algorithm; according to the distribution information of the foreground and the background, the PSD is processed The picture is sliced.

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Editing Of Facsimile Originals (AREA)
  • Image Processing (AREA)

Abstract

The present invention relates to an automatic slicing method and device for a PSD picture. The method comprises: obtaining the PSD picture; performing binarization processing on the PSD picture, and determining a foreground and a background in the PSD picture; extracting distribution information of the foreground and the background by means of an image segmentation algorithm; and slicing the PSD picture according to the distribution information of the foreground and the background. According to the solution of the present invention, automatic slicing of the PSD picture can be achieved without depending on a PSD document structured directory and layer naming, the mutual relation of visual elements can be kept by means of the slicing, and the visual elements would not be split to different canvases, so that the integrity of the visual design relation of the PSD picture is guaranteed, and the use complexity of the PSD picture and the use cost of a designer are reduced.

Description

PSD图片的自动切片方法及装置Automatic slicing method and device for PSD pictures
本申请要求2021年7月16日提交至中国知识产权局的,申请号为202110804654.X,名称为“PSD图片的自动切片方法及装置”的中国发明专利申请的优先权,其全部公开内容结合于此作为参考。This application claims the priority of the Chinese invention patent application with the application number 202110804654.X and the title "Automatic slicing method and device for PSD pictures" submitted to the China Intellectual Property Office on July 16, 2021, the entire disclosure content of which is incorporated Here for reference.
技术领域technical field
本公开一般地涉及计算机技术领域。更具体地,本公开涉及PSD图片的自动切片方法及装置。The present disclosure relates generally to the field of computer technology. More specifically, the present disclosure relates to a method and device for automatically slicing PSD pictures.
背景技术Background technique
目前,网页设计者习惯使用Photoshop参与进行网页设计,在使用Photoshop产生的PSD格式的图片文档时,经常需要对其进行切片,以便于PSD图片文档中各元素的转移使用。At present, webpage designers are used to using Photoshop to participate in webpage design. When using PSD format image files generated by Photoshop, they often need to slice them to facilitate the transfer and use of various elements in the PSD image files.
然而,目前将PSD图片文档切片主要有两种方式:第一种是不考虑PSD图片文档视觉结构设计,而将PSD图片文档均等的拆分成高度一样的切片;第二种是在PSD图片文档中使用约定的目录结构与图层文件命名,标识出切片范围,再根据切片框定的区域来分割文档。针对这两种方式,存在如下问题:对PSD文档进行简单的均等切片处理,切分出来的文档区域一般会破坏原本PSD图片文档中的视觉设计划分,例如将一个视觉上完整的对象拆分到上下两个切片中;对PSD文档进行结构化约定和图层命名标识来标识切片范围,虽然可以规避视觉设计对象被拆分的问题,但由于约定化的结构命名的存在,大大提高了文档使用的复杂度,也增加了设计师使用的成本。However, there are currently two ways to slice PSD image files: the first is to split the PSD image files into slices with the same height regardless of the visual structure design of the PSD image file; the second is to split the PSD image file into Use the agreed directory structure and layer file naming in , identify the slice range, and then divide the document according to the area framed by the slice. For these two methods, there are the following problems: the PSD file is simply sliced equally, and the segmented document area will generally destroy the visual design division in the original PSD image file, such as splitting a visually complete object into In the upper and lower slices; Structural conventions and layer naming marks are carried out on the PSD document to identify the slice range. Although the problem of splitting visual design objects can be avoided, due to the existence of the agreed structure naming, the use of documents is greatly improved. The complexity also increases the cost for designers to use.
因此如何获得一种优化的切片方法为现有技术中需要解决的问题。Therefore, how to obtain an optimized slicing method is a problem to be solved in the prior art.
发明内容Contents of the invention
为了至少部分地解决背景技术中提到的技术问题,本公开的方案提供了一种PSD图片的自动切片方法及装置。In order to at least partly solve the technical problems mentioned in the background art, the solutions of the present disclosure provide a method and device for automatically slicing PSD pictures.
根据本公开的第一方面,本公开提供一种PSD图片的自动切片方法,其中,所述方法包括:获取所述PSD图片;对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景;通过图像分割算法提取所述前景和所述背景的分布信息;根据所述前景和所述背景的分布信息,对所述PSD 图片进行切片。According to the first aspect of the present disclosure, the present disclosure provides a method for automatically slicing a PSD picture, wherein the method includes: acquiring the PSD picture; performing binarization processing on the PSD picture, and determining the foreground and background; extract the distribution information of the foreground and the background through an image segmentation algorithm; slice the PSD picture according to the distribution information of the foreground and the background.
可选的,所述对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景包括:对所述PSD图片进行预处理;对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景。Optionally, performing binarization processing on the PSD picture, and determining the foreground and background in the PSD picture include: performing preprocessing on the PSD picture; performing binarization processing on the preprocessed PSD picture to determine the foreground and background in the PSD picture.
可选的,所述对所述PSD图片进行预处理包括:对所述PSD图片进行灰度化处理;对灰度化处理后的PSD图片进行降噪和锐化处理。Optionally, the preprocessing of the PSD picture includes: performing grayscale processing on the PSD picture; performing noise reduction and sharpening processing on the grayscale processed PSD picture.
可选的,所述对所述PSD图片进行灰度化处理包括:将所述PSD图片中的每个像素的红黄蓝三色的值的平均值作为每个像素各自灰度化后的灰度值,或者将所述PSD图片中的每个像素的红黄蓝三色的值各自乘以不同的系数之后的和作为每个像素各自灰度化后的灰度值。Optionally, the grayscale processing of the PSD picture includes: taking the average value of the red, yellow and blue values of each pixel in the PSD picture as the grayscale value of each pixel after grayscale. value, or the sum of the red, yellow and blue values of each pixel in the PSD image multiplied by different coefficients as the gray value of each pixel after graying.
可选的,所述对灰度化处理后的PSD图片进行降噪和锐化处理包括:通过高斯滤波对灰度化处理后的PSD图片进行降噪,通过高通滤波对灰度化处理后的PSD图片进行锐化处理。Optionally, the denoising and sharpening processing of the grayscaled PSD picture includes: performing noise reduction on the grayscaled PSD picture through Gaussian filtering, and performing high pass filtering on the grayscaled PSD picture PSD images are sharpened.
可选的,所述对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景包括:通过大津算法获得预处理后的PSD图片的二值化阈值;根据所述二值化阈值对所述预处理后的PSD图片进行二值化处理。Optionally, performing binarization processing on the preprocessed PSD picture, and determining the foreground and background in the PSD picture include: obtaining the binarization threshold of the preprocessed PSD picture through the Otsu algorithm; according to the The binarization threshold performs binarization processing on the preprocessed PSD picture.
可选的,所述通过图像分割算法提取所述前景和所述背景的分布信息包括:通过投影切割算法获得所述前景和所述背景的分布信息。Optionally, the extracting the distribution information of the foreground and the background through an image segmentation algorithm includes: obtaining the distribution information of the foreground and the background through a projection cutting algorithm.
可选的,所述分布信息是通过逐行扫描获得的所述前景和所述背景之间的上下边界线。Optionally, the distribution information is upper and lower boundary lines between the foreground and the background obtained through progressive scanning.
可选的,所述根据所述前景和所述背景的分布信息,对所述PSD图片进行切片包括:根据所述前景和所述背景的分布信息确定所述PSD图片的切割线;根据所述切割线,切割出所述前景,以将所述PSD图片切片。Optionally, the slicing the PSD picture according to the distribution information of the foreground and the background includes: determining a cutting line of the PSD picture according to the distribution information of the foreground and the background; A cutting line cuts out the foreground to slice the PSD picture.
根据本公开的第二方面,本公开提供一种PSD图片的自动切片装置,其中,所述装置包括:获取模块,其配置为用于获取所述PSD图片;处理模块,其配置为用于对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景;提取模块,其配置为用于通过图像分割算法提取所述前 景和所述背景的分布信息;切片模块,其配置为用于根据所述前景和所述背景的分布信息,对所述PSD图片进行切片。According to a second aspect of the present disclosure, the present disclosure provides an automatic slicing device for a PSD picture, wherein the device includes: an acquisition module configured to acquire the PSD picture; a processing module configured to process the PSD picture The PSD picture is binarized to determine the foreground and background in the PSD picture; the extraction module is configured to extract the distribution information of the foreground and the background through an image segmentation algorithm; the slicing module is configured Slicing the PSD picture is used to slice the PSD picture according to the distribution information of the foreground and the background.
可选的,所述处理模块用于采取如下方式对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景:对所述PSD图片进行预处理;对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景。Optionally, the processing module is configured to perform binarization processing on the PSD picture in the following manner to determine the foreground and background in the PSD picture: preprocessing the PSD picture; The image is binarized to determine the foreground and background in the PSD image.
可选的,所述处理模块用于采取如下方式对所述PSD图片进行预处理:对所述PSD图片进行灰度化处理;对灰度化处理后的PSD图片进行降噪和锐化处理。Optionally, the processing module is configured to preprocess the PSD picture in the following manner: perform grayscale processing on the PSD picture; perform noise reduction and sharpening processing on the grayscale processed PSD picture.
可选的,所述处理模块用于采取如下方式对所述PSD图片进行灰度化处理:将所述PSD图片中的每个像素的红黄蓝三色的值的平均值作为每个像素各自灰度化后的灰度值,或者将所述PSD图片中的每个像素的红黄蓝三色的值各自乘以不同的系数之后的和作为每个像素各自灰度化后的灰度值。Optionally, the processing module is configured to perform grayscale processing on the PSD picture in the following manner: taking the average value of the red, yellow and blue values of each pixel in the PSD picture as the respective values of each pixel The grayscale value after grayscale, or the sum of the red, yellow, and blue color values of each pixel in the PSD image multiplied by different coefficients as the grayscale value of each pixel after grayscale .
可选的,所述处理模块用于采取如下方式对灰度化处理后的PSD图片进行降噪和锐化处理:通过高斯滤波对灰度化处理后的PSD图片进行降噪,通过高通滤波对灰度化处理后的PSD图片进行锐化处理。Optionally, the processing module is used to perform denoising and sharpening processing on the grayscaled PSD picture in the following manner: denoise the grayscaled PSD picture through Gaussian filtering, and denoise the grayscaled PSD picture through high-pass filtering. The grayscaled PSD image is sharpened.
可选的,所述处理模块用于采取如下方式对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景:通过大津算法获得预处理后的PSD图片的二值化阈值;根据所述二值化阈值对所述预处理后的PSD图片进行二值化处理。Optionally, the processing module is used to perform binarization processing on the preprocessed PSD picture in the following manner to determine the foreground and background in the PSD picture: Obtain the binary value of the preprocessed PSD picture by the Otsu algorithm threshold; according to the binarization threshold, the preprocessed PSD picture is binarized.
可选的,所述提取模块用于采取如下方式通过图像分割算法提取所述前景和所述背景的分布信息:通过投影切割算法获得所述前景和所述背景的分布信息。Optionally, the extraction module is configured to extract the distribution information of the foreground and the background through an image segmentation algorithm in the following manner: obtain the distribution information of the foreground and the background through a projection cutting algorithm.
可选的,所述分布信息是通过逐行扫描获得的所述前景和所述背景之间的上下边界线。Optionally, the distribution information is upper and lower boundary lines between the foreground and the background obtained through progressive scanning.
可选的,所述切片模块用于采取如下方式根据所述前景和所述背景的 分布信息,对所述PSD图片进行切片:根据所述前景和所述背景的分布信息确定所述PSD图片的切割线;根据所述切割线,切割出所述前景,以将所述PSD图片切片。Optionally, the slicing module is configured to slice the PSD picture according to the distribution information of the foreground and the background in the following manner: determine the PSD picture according to the distribution information of the foreground and the background Cutting line: Cut out the foreground according to the cutting line, so as to slice the PSD picture.
根据本公开的第三方面,本公开提供一种PSD图片的自动切片装置,其中,所述装置包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器执行所述计算机程序时,实现上述本公开的第一方面的方法。According to a third aspect of the present disclosure, the present disclosure provides a device for automatically slicing PSD pictures, wherein the device includes a memory and a processor, a computer program is stored in the memory, and when the processor executes the computer program , implementing the above-mentioned method of the first aspect of the present disclosure.
根据本公开的第四方面,本公开提供一种计算机可读存储介质,其中,所述存储介质存储有计算机程序,所述计算机程序被执行时,实现上述本公开的第一方面的方法。According to a fourth aspect of the present disclosure, the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed, implements the above-mentioned method of the first aspect of the present disclosure.
通过本公开的PSD图片的自动切片方法和装置,可以在不依赖PSD文档结构化目录与图层命名的情况下实现PSD图片的自动切片,并且切片可以保持视觉元素的相互关系,不会被拆分到不同画布,从而在保证了PSD图片视觉设计关系的完整性的同时,降低了PSD图片的使用复杂度和设计师的使用成本。Through the automatic slicing method and device for PSD pictures of the present disclosure, the automatic slicing of PSD pictures can be realized without relying on the PSD document structured directory and layer naming, and the slicing can maintain the relationship between visual elements and will not be disassembled. Divide into different canvases, so as to ensure the integrity of the visual design relationship of PSD pictures, and at the same time reduce the complexity of using PSD pictures and the cost of designers.
附图说明Description of drawings
通过参考附图阅读下文的详细描述,本公开示例性实施方式的上述以及其他目的、特征和优点将变得易于理解。在附图中,以示例性而非限制性的方式示出了本公开的若干实施方式,并且相同或对应的标号表示相同或对应的部分其中:The above and other objects, features and advantages of exemplary embodiments of the present disclosure will become readily understood by reading the following detailed description with reference to the accompanying drawings. In the drawings, several embodiments of the present disclosure are shown by way of illustration and not limitation, and the same or corresponding reference numerals indicate the same or corresponding parts wherein:
图1是示出根据本公开的一个实施例的PSD图片的自动切片方法的流程图;FIG. 1 is a flow chart illustrating an automatic slicing method of a PSD picture according to an embodiment of the present disclosure;
图2是示出根据本公开的一个实施例的PSD图片的自动切片装置的示意性框图。Fig. 2 is a schematic block diagram illustrating an automatic slicing device for a PSD picture according to an embodiment of the present disclosure.
具体实施方式detailed description
下面将结合本公开实施例中的附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本公开一部分实施例,而不是全部的实施例。基于本公开中的实施例,本领域技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都属于本公开保护的范围。The following will clearly and completely describe the technical solutions in the embodiments of the present disclosure with reference to the accompanying drawings in the embodiments of the present disclosure. Apparently, the described embodiments are part of the embodiments of the present disclosure, not all of them. Based on the embodiments in the present disclosure, all other embodiments obtained by those skilled in the art without making creative efforts belong to the protection scope of the present disclosure.
下面结合附图来详细描述本公开的具体实施方式。Specific embodiments of the present disclosure will be described in detail below in conjunction with the accompanying drawings.
本公开提供一种PSD图片的自动切片方法。参照图1,图1是示出根据本公开的一个实施例的PSD图片的自动切片方法的流程图。如图1中所示,所述方法包括以下步骤S101-S104。步骤S101:获取所述PSD图片。步骤S102:对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景。步骤S103:通过图像分割算法提取所述前景和所述背景的分布信息。步骤S104:根据所述前景和所述背景的分布信息,对所述PSD图片进行切片。The present disclosure provides a method for automatically slicing PSD pictures. Referring to FIG. 1 , FIG. 1 is a flowchart illustrating an automatic slicing method of a PSD picture according to an embodiment of the present disclosure. As shown in Fig. 1, the method includes the following steps S101-S104. Step S101: Acquiring the PSD picture. Step S102: Perform binarization processing on the PSD picture, and determine the foreground and background in the PSD picture. Step S103: extracting the distribution information of the foreground and the background through an image segmentation algorithm. Step S104: slice the PSD picture according to the distribution information of the foreground and the background.
通过本公开的PSD图片的自动切片方法,可以在不依赖PSD文档结构化目录与图层命名的情况下实现PSD图片的自动切片,并且切片可以保持视觉元素的相互关系,不会被拆分到不同画布,从而在保证了PSD图片视觉设计关系的完整性的同时,降低了PSD图片的使用复杂度和设计师的使用成本。Through the automatic slicing method of PSD pictures disclosed in the present disclosure, automatic slicing of PSD pictures can be realized without relying on the PSD document structured directory and layer naming, and the slices can maintain the mutual relationship of visual elements and will not be split into Different canvases, so as to ensure the integrity of the visual design relationship of PSD pictures, at the same time reduce the complexity of using PSD pictures and the cost of designers.
在步骤S101中,可以获取所述PSD图片。In step S101, the PSD picture may be acquired.
根据本公开的实施例,为了对PSD图片进行切片,首先应获取待切片的PSD图片。该PSD图片可以是通过任何适当途径获取到的,例如可以来自于图库,由设计人员专门设计等等。According to an embodiment of the present disclosure, in order to slice a PSD picture, the PSD picture to be sliced should first be acquired. The PSD image can be obtained through any appropriate means, for example, it can be from a gallery, specially designed by a designer, and so on.
在步骤S102中,可以对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景。In step S102, the PSD picture may be binarized to determine the foreground and background in the PSD picture.
根据本公开的实施例,在获取到PSD图片后,可以借助二值化处理来确定所述PSD图片中的前景和背景。前景是指图片中被针对或待被使用的对象。后景是指图片中除前景以外的区域。According to an embodiment of the present disclosure, after the PSD picture is acquired, the foreground and the background in the PSD picture may be determined by means of binarization processing. The foreground refers to the object being targeted or to be used in the picture. The background refers to the area in the picture other than the foreground.
具体地,所述对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景可以包括:对所述PSD图片进行预处理;对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景。Specifically, performing binarization processing on the PSD picture and determining the foreground and background in the PSD picture may include: performing preprocessing on the PSD picture; performing binarization processing on the preprocessed PSD picture to determine the foreground and background in the PSD picture.
根据本公开的实施例,在对PSD图片进行二值化处理之前,需要对PSD图片进行预处理,以便实现二值化处理或在二值化处理后具有更好的效果。According to an embodiment of the present disclosure, before binarizing the PSD picture, it is necessary to perform preprocessing on the PSD picture, so as to realize the binarization process or have a better effect after the binarization process.
进一步地,所述对所述PSD图片进行预处理可以包括:对所述PSD图片进行灰度化处理;对灰度化处理后的PSD图片进行降噪和锐化处理。Further, the preprocessing of the PSD picture may include: performing grayscale processing on the PSD picture; performing noise reduction and sharpening processing on the grayscale processed PSD picture.
为了进行二值化处理,首先对PSD图片进行灰度化处理,以便获得灰 度图片。所述对所述PSD图片进行灰度化处理可以包括:将所述PSD图片中的每个像素的红黄蓝三色的值的平均值作为每个像素各自灰度化后的灰度值,或者将所述PSD图片中的每个像素的红黄蓝三色的值各自乘以不同的系数之后的和作为每个像素各自灰度化后的灰度值。在对图片灰度化时,每个像素在灰度化后的灰度值可以等于该像素灰度化之前的红黄蓝三色的值的平均值,或者每个像素在灰度化后的灰度值还可以等于该像素灰度化之前的红黄蓝三色的值各自乘以不同的系数之后的和。本公开可以采用任何适用的灰度化方法,在此不作限制。In order to carry out binarization processing, the PSD image is first grayscaled so as to obtain a grayscale image. The grayscale processing of the PSD picture may include: taking the average value of the red, yellow and blue values of each pixel in the PSD picture as the grayscale value of each pixel after grayscale, Alternatively, the sum of the red, yellow and blue values of each pixel in the PSD image multiplied by different coefficients is used as the gray value of each pixel after graying. When graying an image, the gray value of each pixel after graying can be equal to the average value of the red, yellow, and blue values of the pixel before graying, or the gray value of each pixel after graying The grayscale value may also be equal to the sum of the values of red, yellow, and blue colors before the grayscale of the pixel is multiplied by different coefficients. The present disclosure may adopt any suitable grayscale method, which is not limited here.
在对PSD图片进行灰度化处理之后,可以进行降噪和锐化处理。其中,所述对灰度化处理后的PSD图片进行降噪和锐化处理可以包括:通过高斯滤波对灰度化处理后的PSD图片进行降噪,通过高通滤波对灰度化处理后的PSD图片进行锐化处理。降噪可以采用高斯滤波等任何适用的降噪算法来实现,锐化可以采用高通滤波等任何适用的锐化算法来实现。通过降噪和锐化处理,可以提高图片质量。After the grayscale processing of the PSD image, noise reduction and sharpening can be performed. Wherein, the denoising and sharpening processing of the grayscaled PSD picture may include: performing noise reduction on the grayscaled PSD picture through Gaussian filtering, and performing high pass filtering on the grayscaled PSD picture. The image is sharpened. Noise reduction can be implemented by using any applicable noise reduction algorithm such as Gaussian filtering, and sharpening can be implemented by using any applicable sharpening algorithm such as high-pass filtering. Image quality can be improved through noise reduction and sharpening.
此外,对所述PSD图片进行预处理还可以仅包括对所述PSD图片进行灰度化处理。针对这种情况,获得的二值化处理后的PSD图片可以满足对图片质量要求不高的应用。In addition, performing preprocessing on the PSD picture may also include only performing grayscale processing on the PSD picture. In view of this situation, the PSD image obtained after binarization processing can satisfy applications that do not require high image quality.
在对PSD图片进行完以上预处理之后,可以进行二值化处理,以便确定所述PSD图片中的前景和背景。更具体地,所述对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景可以包括:通过大津算法获得预处理后的PSD图片的二值化阈值;根据所述二值化阈值对所述预处理后的PSD图片进行二值化处理。After the above preprocessing is performed on the PSD picture, binarization processing may be performed so as to determine the foreground and background in the PSD picture. More specifically, said performing binarization processing on the preprocessed PSD picture, and determining the foreground and background in the PSD picture may include: obtaining the binarization threshold of the preprocessed PSD picture through the Otsu algorithm; The binarization threshold is used to perform binarization processing on the preprocessed PSD picture.
根据本公开的实施例,针对预处理后的PSD图片,可以通过大津算法来获得二值化阈值。大津算法会假定该图片包括两类像素,即前景像素和背景像素,并且会计算能将两类像素分开的最佳阈值,即二值化阈值。在获得二值化阈值后,可以对预处理后的PSD图片进行二值化处理,从而获得黑白图片,而该黑白图片中的黑白两色部分分别代表前景部分和后景部 分。通过在大津算法中设定,可以将黑色设为背景部分,将白色设为前景部分,当然还可以根据需要将白色设为背景部分,将黑色设为前景部分。According to an embodiment of the present disclosure, for the preprocessed PSD picture, the binarization threshold can be obtained through the Otsu algorithm. The Otsu algorithm assumes that the picture includes two types of pixels, namely, foreground pixels and background pixels, and calculates the best threshold that can separate the two types of pixels, that is, the binarization threshold. After the binarization threshold is obtained, the preprocessed PSD picture can be binarized to obtain a black and white picture, and the black and white parts in the black and white picture represent the foreground part and the background part respectively. By setting in the Otsu algorithm, black can be set as the background part and white can be set as the foreground part. Of course, white can be set as the background part and black can be set as the foreground part according to the needs.
此外,还可以通过其它任何适用的算法对预处理后的PSD图片进行二值化处理,只要能够区分出图片的前景和背景即可。In addition, the preprocessed PSD picture can also be binarized by any other applicable algorithm, as long as the foreground and background of the picture can be distinguished.
在步骤S103中,可以通过图像分割算法提取所述前景和所述背景的分布信息。In step S103, distribution information of the foreground and the background may be extracted through an image segmentation algorithm.
根据本公开的实施例,在对PSD图片区分出前景和背景后,可以通过图像分割算法提取前景和背景的分布信息。该分布信息可以包括前景和背景之间的边界线的坐标、尺寸大小等等。According to an embodiment of the present disclosure, after distinguishing the foreground and the background of the PSD picture, the distribution information of the foreground and the background can be extracted through an image segmentation algorithm. The distribution information may include the coordinates, size and the like of the boundary line between the foreground and the background.
具体地,所述通过图像分割算法提取所述前景和所述背景的分布信息可以包括:通过投影切割算法获得所述前景和所述背景的分布信息。Specifically, the extracting the distribution information of the foreground and the background through an image segmentation algorithm may include: obtaining the distribution information of the foreground and the background through a projection cutting algorithm.
根据本公开的实施例,通过投影切割算法,可以逐行扫描如上获得的黑白图片,从而可以根据像素灰度(黑或白)来确定前景(例如白色部分)和背景(例如黑色部分)的分布信息。在该实施例中,分布信息例如可以是通过逐行扫描获得的所述前景和所述背景之间的上下边界线。根据投影切割算法可知,该上下边界线是贯穿整个图片的水平边界线,即在对图片进行逐行扫描时,在当前像素行中没有前景像素(白色像素)且上一像素行中有前景像素时,则可将该当前像素行作为下边界线;在当前像素行中有前景像素(白色像素)且上一像素行中没有前景像素时,则可将该当前像素行作为上边界线。According to an embodiment of the present disclosure, the black-and-white picture obtained above can be scanned line by line through the projection cutting algorithm, so that the distribution of foreground (such as white part) and background (such as black part) can be determined according to the pixel grayscale (black or white) information. In this embodiment, the distribution information may be, for example, upper and lower boundary lines between the foreground and the background obtained through progressive scanning. According to the projection cutting algorithm, the upper and lower boundary lines are horizontal boundary lines that run through the entire picture, that is, when the picture is scanned line by line, there are no foreground pixels (white pixels) in the current pixel line and there are foreground pixels in the previous pixel line , then the current pixel row can be used as the lower boundary line; when there are foreground pixels (white pixels) in the current pixel row and there is no foreground pixel in the previous pixel row, the current pixel row can be used as the upper boundary line.
当然,还可以通过其它任何适用的图像分割算法来提取前景和背景的分布信息。Of course, the distribution information of foreground and background can also be extracted by any other applicable image segmentation algorithm.
在步骤S104中,可以根据所述前景和所述背景的分布信息,对所述PSD图片进行切片。In step S104, the PSD picture may be sliced according to the distribution information of the foreground and the background.
根据本公开的实施例,在获得了前景和背景的分布信息之后,可以将前景从背景中分割出来,而不破坏前景的完整性。According to the embodiments of the present disclosure, after obtaining the distribution information of the foreground and the background, the foreground can be segmented from the background without destroying the integrity of the foreground.
具体地,所述根据所述前景和所述背景的分布信息,对所述PSD图片 进行切片包括:根据所述前景和所述背景的分布信息确定所述PSD图片的切割线;根据所述切割线,切割出所述前景,以将所述PSD图片切片。Specifically, the slicing the PSD picture according to the distribution information of the foreground and the background includes: determining the cutting line of the PSD picture according to the distribution information of the foreground and the background; line to cut out the foreground to slice the PSD picture.
根据本公开的实施例,可以根据前景和背景的分布信息,例如上述的边界线来确定切割线。具体地,在存在多条上、下边界线的情况下(存在多个前景的情况),可以在中间没有前景像素的相邻的上、下边界线之间取一条线,使得该条线与上、下边界线平行并且与上、下边界线间隔相同的距离,并且可以将该条线作为切割线。对于位于最上方的上边界线(对应于最上方的前景),其上方不存在与其相邻的下边界线(上方不存在前景),因此可以将该上边界线上方的与该上边界线间隔预设行数的像素行作为切割线。对于位于最下方的下边界线(对应于最下方的前景),其下方不存在与其相邻的上边界线(下方不存在前景),因此可以将该下边界线下方的与该下边界线间隔预设行数的像素行作为切割线。在存在多条切割线的情况下,沿着切割线对PSD图片进行横向(水平)切割以切割出前景,从而实现对PSD图片的切片。According to an embodiment of the present disclosure, the cutting line may be determined according to the distribution information of the foreground and the background, such as the above-mentioned boundary line. Specifically, in the case where there are multiple upper and lower boundary lines (in the case of multiple foregrounds), a line can be taken between adjacent upper and lower boundary lines without foreground pixels in the middle, so that the line is consistent with the upper and lower boundary lines. The lower boundary line is parallel and spaced the same distance from the upper and lower boundary lines, and this line can be used as a cutting line. For the uppermost upper boundary line (corresponding to the uppermost foreground), there is no adjacent lower boundary line above it (there is no foreground above it), so the upper boundary line above the upper boundary line can be separated from the upper boundary line by a predetermined distance. Let the number of rows of pixels be used as cutting lines. For the lower boundary line located at the bottom (corresponding to the bottommost foreground), there is no upper boundary line adjacent to it below it (there is no foreground below it), so the distance between the lower boundary line and the lower boundary line can be preset. number of pixel rows as cutting lines. In the case that there are multiple cutting lines, the PSD picture is cut horizontally (horizontally) along the cutting lines to cut out the foreground, so as to realize the slicing of the PSD picture.
应注意的是,每个切片中可包含多个前景,尤其多个前景在水平(横向)方向高低错落布置(至少一个相同像素行穿过多个前景)时,如上所述的切割线会将多个前景夹在其中。It should be noted that each slice may contain multiple foregrounds, especially when multiple foregrounds are arranged in a horizontal (horizontal) direction (at least one same pixel row passes through multiple foregrounds), the above-mentioned cutting line will Multiple foregrounds are sandwiched in it.
此外,针对以上步骤S103和S104中的内容,通过类似方法,还可以通过投影切割算法,逐列扫描如上获得的黑白图片,获得左、右边界线,再通过该左、右边界线确定切割线,最后通过切割线纵向(垂直)切割,从而实现对PSD图片的切片。In addition, for the content in the above steps S103 and S104, through a similar method, the black and white pictures obtained above can also be scanned column by column through the projection cutting algorithm to obtain the left and right boundary lines, and then determine the cutting line through the left and right boundary lines, and finally Cut through the cutting line longitudinally (perpendicularly), so as to realize the slicing of the PSD picture.
本公开还提供一种PSD图片的自动切片装置。该装置用于执行以上结合图1所描述的PSD图片的自动切片方法实施例中的步骤。The present disclosure also provides an automatic slicing device for PSD pictures. The device is used to execute the steps in the embodiment of the method for automatically slicing PSD pictures described above in conjunction with FIG. 1 .
参照图2,图2是示出根据本公开的一个实施例的PSD图片的自动切片装置100的示意性框图。该装置100包括获取模块101、处理模块102、提取模块103和切片模块104。该获取模块101配置为用于获取所述PSD图片。该处理模块102配置为用于对所述PSD图片进行二值化处理,确定 所述PSD图片中的前景和背景。该提取模块103配置为用于通过图像分割算法提取所述前景和所述背景的分布信息。该切片模块104配置为用于根据所述前景和所述背景的分布信息,对所述PSD图片进行切片。Referring to FIG. 2 , FIG. 2 is a schematic block diagram illustrating an automatic slicing apparatus 100 for PSD pictures according to an embodiment of the present disclosure. The apparatus 100 includes an acquisition module 101 , a processing module 102 , an extraction module 103 and a slicing module 104 . The obtaining module 101 is configured to obtain the PSD picture. The processing module 102 is configured to perform binarization processing on the PSD picture, and determine the foreground and background in the PSD picture. The extraction module 103 is configured to extract the distribution information of the foreground and the background through an image segmentation algorithm. The slicing module 104 is configured to slice the PSD picture according to the distribution information of the foreground and the background.
根据本公开的实施例,所述处理模块102用于采取如下方式对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景:对所述PSD图片进行预处理;对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景。According to an embodiment of the present disclosure, the processing module 102 is configured to perform binarization processing on the PSD picture in the following manner to determine the foreground and background in the PSD picture: preprocessing the PSD picture; The processed PSD picture is subjected to binarization processing to determine the foreground and background in the PSD picture.
根据本公开的实施例,所述处理模块102用于采取如下方式对所述PSD图片进行预处理:对所述PSD图片进行灰度化处理;对灰度化处理后的PSD图片进行降噪和锐化处理。According to an embodiment of the present disclosure, the processing module 102 is configured to preprocess the PSD picture in the following manner: perform grayscale processing on the PSD picture; perform noise reduction and Sharpening.
根据本公开的实施例,所述处理模块102用于采取如下方式对所述PSD图片进行灰度化处理:将所述PSD图片中的每个像素的红黄蓝三色的值的平均值作为每个像素各自灰度化后的灰度值,或者将所述PSD图片中的每个像素的红黄蓝三色的值各自乘以不同的系数之后的和作为每个像素各自灰度化后的灰度值。According to an embodiment of the present disclosure, the processing module 102 is configured to grayscale the PSD picture in the following manner: take the average value of the red, yellow and blue values of each pixel in the PSD picture as The grayscale value of each pixel after grayscale, or the sum of the red, yellow and blue color values of each pixel in the PSD image multiplied by different coefficients as the grayscale value of each pixel gray value of .
根据本公开的实施例,所述处理模块102用于采取如下方式对灰度化处理后的PSD图片进行降噪和锐化处理:通过高斯滤波对灰度化处理后的PSD图片进行降噪,通过高通滤波对灰度化处理后的PSD图片进行锐化处理。According to an embodiment of the present disclosure, the processing module 102 is configured to perform noise reduction and sharpening processing on the grayscaled PSD picture in the following manner: denoise the grayscaled PSD picture by Gaussian filtering, The gray-scaled PSD image is sharpened by high-pass filtering.
根据本公开的实施例,所述处理模块102用于采取如下方式对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景:通过大津算法获得预处理后的PSD图片的二值化阈值;根据所述二值化阈值对所述预处理后的PSD图片进行二值化处理。According to an embodiment of the present disclosure, the processing module 102 is configured to perform binarization processing on the preprocessed PSD picture in the following manner to determine the foreground and background in the PSD picture: Obtain the preprocessed PSD through the Otsu algorithm The binarization threshold of the picture; performing binarization processing on the preprocessed PSD picture according to the binarization threshold.
根据本公开的实施例,所述提取模块103用于采取如下方式通过图像分割算法提取所述前景和所述背景的分布信息:通过投影切割算法获得所述前景和所述背景的分布信息。According to an embodiment of the present disclosure, the extraction module 103 is configured to extract the distribution information of the foreground and the background through an image segmentation algorithm in the following manner: obtain the distribution information of the foreground and the background through a projection cutting algorithm.
根据本公开的实施例,所述分布信息是通过逐行扫描获得的所述前景 和所述背景之间的上下边界线。According to an embodiment of the present disclosure, the distribution information is upper and lower boundary lines between the foreground and the background obtained by progressive scanning.
根据本公开的实施例,所述切片模块104用于采取如下方式根据所述前景和所述背景的分布信息,对所述PSD图片进行切片:根据所述背景的分布信息确定所述PSD图片的切割线;根据所述前景的分布信息和所述切割线,切割出所述前景,以将所述PSD图片切片。According to an embodiment of the present disclosure, the slicing module 104 is configured to slice the PSD picture according to the distribution information of the foreground and the background in the following manner: determine the PSD picture according to the distribution information of the background Cutting line: cutting out the foreground according to the distribution information of the foreground and the cutting line, so as to slice the PSD picture.
可以理解的是,关于以上参照图2描述的实施例中的PSD图片的自动切片装置,其中各个模块执行操作的具体方式已经在结合图1所描述的PSD图片的自动切片方法的实施例中进行了详细描述,此处将不做详细阐述说明。It can be understood that, with regard to the automatic slicing device for PSD pictures in the embodiment described above with reference to FIG. A detailed description is given, so no detailed explanation will be given here.
本公开实施例还提供一种页面组件生成装置,其中,所述装置包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器执行所述计算机程序时,实现如下步骤:获取所述PSD图片;对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景;通过图像分割算法提取所述前景和所述背景的分布信息;根据所述前景和所述背景的分布信息,对所述PSD图片进行切片。An embodiment of the present disclosure also provides a device for generating a page component, wherein the device includes a memory and a processor, the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented: obtaining the Described PSD picture; Carry out binarization process to described PSD picture, determine the foreground and background in the described PSD picture; Extract the distribution information of described foreground and described background by image segmentation algorithm; According to described foreground and described background The distribution information of the PSD picture is sliced.
可以理解的是,所述处理器执行所述计算机程序时实现的步骤与上述方法中的各个步骤的实现方式基本一致,具体方式已经在有关PSD图片的自动切片方法的实施例中进行了详细描述,此处将不做详细阐述说明。It can be understood that the steps implemented when the processor executes the computer program are basically the same as the implementation of each step in the above method, and the specific method has been described in detail in the embodiment of the automatic slicing method for PSD pictures , which will not be elaborated here.
在另一方面中,本公开提供一种计算机可读存储介质,其中,所述存储介质存储有计算机程序,所述计算机程序被执行时,实现如下步骤:获取所述PSD图片;对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景;通过图像分割算法提取所述前景和所述背景的分布信息;根据所述前景和所述背景的分布信息,对所述PSD图片进行切片。In another aspect, the present disclosure provides a computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed, the following steps are implemented: acquiring the PSD picture; The picture is binarized to determine the foreground and background in the PSD picture; the distribution information of the foreground and the background is extracted by an image segmentation algorithm; according to the distribution information of the foreground and the background, the PSD is processed The picture is sliced.
可以理解的是,所述处理器执行所述计算机程序时实现的步骤与上述方法中的各个步骤的实现方式基本一致,具体方式已经在有关PSD图片的自动切片方法的实施例中进行了详细描述,此处将不做详细阐述说明。It can be understood that the steps implemented when the processor executes the computer program are basically the same as the implementation of each step in the above method, and the specific method has been described in detail in the embodiment of the automatic slicing method for PSD pictures , which will not be elaborated here.
以上对本公开实施例进行了详细介绍,本文中应用了具体个例对本公 开的原理及实施方式进行了阐述,以上实施例的说明只是用于帮助理解本公开的方法及其核心思想;同时,对于本领域的一般技术人员,依据本公开的思想,在具体实施方式及应用范围上均会有改变之处,综上所述,本说明书内容不应理解为对本公开的限制。The embodiments of the present disclosure have been introduced in detail above, and the principles and implementation methods of the present disclosure have been explained by using specific examples in this article. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present disclosure; at the same time, for Those skilled in the art may have changes in specific implementation methods and application scopes based on the idea of the present disclosure. In summary, the contents of this specification should not be construed as limiting the present disclosure.
应当理解,本公开的权利要求、说明书及附图中的术语“第一”和“第二”、等是用于区别不同对象,而不是用于描述特定顺序。本公开的说明书和权利要求书中使用的术语“包括”和“包含”指示所描述特征、整体、步骤、操作、元素和/或组件的存在,但并不排除一个或多个其它特征、整体、步骤、操作、元素、组件和/或其集合的存在或添加。It should be understood that the terms "first" and "second", etc. in the claims, specification and drawings of the present disclosure are used to distinguish different objects, rather than to describe a specific order. The terms "comprising" and "comprises" used in the specification and claims of the present disclosure indicate the presence of described features, integers, steps, operations, elements and/or components, but do not exclude one or more other features, integers , steps, operations, elements, components, and/or the presence or addition of collections thereof.
还应当理解,在此本公开说明书中所使用的术语仅仅是出于描述特定实施例的目的,而并不意在限定本公开。如在本公开说明书和权利要求书中所使用的那样,除非上下文清楚地指明其它情况,否则单数形式的“一”、“一个”及“该”意在包括复数形式。还应当进一步理解,在本公开说明书和权利要求书中使用的术语“和/或”是指相关联列出的项中的一个或多个的任何组合以及所有可能组合,并且包括这些组合。It should also be understood that the terminology used in the present disclosure is for the purpose of describing particular embodiments only and is not intended to be limiting of the present disclosure. As used in this disclosure and the claims, the singular forms "a", "an" and "the" are intended to include plural referents unless the context clearly dictates otherwise. It should be further understood that the term "and/or" used in the present disclosure and claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
以上对本公开实施例进行了详细介绍,本文中应用了具体个例对本公开的原理及实施方式进行了阐述,以上实施例的说明仅用于帮助理解本公开的方法及其核心思想。同时,本领域技术人员依据本公开的思想,基于本公开的具体实施方式及应用范围上做出的改变或变形之处,都属于本公开保护的范围。综上所述,本说明书内容不应理解为对本公开的限制。The embodiments of the present disclosure have been introduced in detail above, and the principles and implementation modes of the present disclosure have been described by using specific examples in this article. The descriptions of the above embodiments are only used to help understand the methods and core ideas of the present disclosure. At the same time, changes or deformations made by those skilled in the art based on the ideas of the present disclosure, specific implementation methods and application scopes of the present disclosure all belong to the scope of protection of the present disclosure. To sum up, the contents of this specification should not be construed as limiting the present disclosure.

Claims (20)

  1. 一种PSD图片的自动切片方法,其中,所述方法包括:A method for automatically slicing PSD pictures, wherein the method includes:
    获取所述PSD图片;Obtain the PSD image;
    对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景;Carry out binarization processing to described PSD picture, determine the foreground and the background in the described PSD picture;
    通过图像分割算法提取所述前景和所述背景的分布信息;Extracting the distribution information of the foreground and the background through an image segmentation algorithm;
    根据所述前景和所述背景的分布信息,对所述PSD图片进行切片。Slice the PSD picture according to the distribution information of the foreground and the background.
  2. 根据权利要求1所述的PSD图片的自动切片方法,其中,所述对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景包括:The automatic slicing method of a PSD picture according to claim 1, wherein said performing binarization processing on said PSD picture, determining the foreground and background in said PSD picture comprises:
    对所述PSD图片进行预处理;Preprocessing the PSD picture;
    对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景。Perform binarization processing on the preprocessed PSD picture, and determine the foreground and background in the PSD picture.
  3. 根据权利要求2所述的PSD图片的自动切片方法,其中,所述对所述PSD图片进行预处理包括:The automatic slicing method of the PSD picture according to claim 2, wherein said preprocessing the PSD picture comprises:
    对所述PSD图片进行灰度化处理;Perform grayscale processing on the PSD image;
    对灰度化处理后的PSD图片进行降噪和锐化处理。Noise reduction and sharpening are performed on the grayscaled PSD image.
  4. 根据权利要求3所述的PSD图片的自动切片方法,其中,所述对所述PSD图片进行灰度化处理包括:The method for automatically slicing PSD pictures according to claim 3, wherein said grayscale processing of said PSD pictures comprises:
    将所述PSD图片中的每个像素的红黄蓝三色的值的平均值作为每个像素各自灰度化后的灰度值,或者将所述PSD图片中的每个像素的红黄蓝三色的值各自乘以不同的系数之后的和作为每个像素各自灰度化后的灰度值。The average value of the red, yellow, and blue values of each pixel in the PSD picture is used as the gray value of each pixel after graying, or the red, yellow, and blue values of each pixel in the PSD picture are The sum of the values of the three colors multiplied by different coefficients is used as the gray value of each pixel after graying.
  5. 根据权利要求3所述的PSD图片的自动切片方法,其中,所述对灰度化处理后的PSD图片进行降噪和锐化处理包括:The automatic slicing method of the PSD picture according to claim 3, wherein said denoising and sharpening the grayscale processed PSD picture comprises:
    通过高斯滤波对灰度化处理后的PSD图片进行降噪,通过高通滤波对灰度化处理后的PSD图片进行锐化处理。The grayscaled PSD image is denoised by Gaussian filtering, and the grayscaled PSD image is sharpened by high pass filtering.
  6. 根据权利要求3所述的PSD图片的自动切片方法,其中,所述对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景包括:The automatic slicing method of the PSD picture according to claim 3, wherein, said performing binarization processing on the preprocessed PSD picture, and determining the foreground and background in the PSD picture include:
    通过大津算法获得预处理后的PSD图片的二值化阈值;Obtain the binarization threshold of the preprocessed PSD image through the Otsu algorithm;
    根据所述二值化阈值对所述预处理后的PSD图片进行二值化处理。Perform binarization processing on the preprocessed PSD picture according to the binarization threshold.
  7. 根据权利要求1至6中任一项所述的PSD图片的自动切片方法,其中,所述通过图像分割算法提取所述前景和所述背景的分布信息包括:The automatic slicing method of the PSD picture according to any one of claims 1 to 6, wherein said extraction of the distribution information of the foreground and the background by an image segmentation algorithm comprises:
    通过投影切割算法获得所述前景和所述背景的分布信息。The distribution information of the foreground and the background is obtained through a projection cutting algorithm.
  8. 根据权利要求7所述的PSD图片的自动切片方法,其中,所述分布信息是通过逐行扫描获得的所述前景和所述背景之间的上下边界线。The method for automatically slicing PSD pictures according to claim 7, wherein the distribution information is upper and lower boundary lines between the foreground and the background obtained through progressive scanning.
  9. 根据权利要求1至6中任一项所述的PSD图片的自动切片方法,其中,所述根据所述前景和所述背景的分布信息,对所述PSD图片进行切片包括:The automatic slicing method of the PSD picture according to any one of claims 1 to 6, wherein said slicing the PSD picture according to the distribution information of the foreground and the background comprises:
    根据所述前景和所述背景的分布信息确定所述PSD图片的切割线;determining the cutting line of the PSD picture according to the distribution information of the foreground and the background;
    根据所述切割线,切割出所述前景,以将所述PSD图片切片。Cut out the foreground according to the cutting line, so as to slice the PSD picture.
  10. 一种PSD图片的自动切片装置,其中,所述装置包括:A kind of automatic slicing device of PSD picture, wherein, described device comprises:
    获取模块,其配置为用于获取所述PSD图片;An acquisition module configured to acquire the PSD picture;
    处理模块,其配置为用于对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景;A processing module configured to perform binarization processing on the PSD picture, and determine the foreground and background in the PSD picture;
    提取模块,其配置为用于通过图像分割算法提取所述前景和所述背景的分布信息;An extraction module configured to extract the distribution information of the foreground and the background through an image segmentation algorithm;
    切片模块,其配置为用于根据所述前景和所述背景的分布信息,对所述PSD图片进行切片。A slicing module configured to slice the PSD picture according to the distribution information of the foreground and the background.
  11. 根据权利要求7所述的PSD图片的自动切片装置,其中,所述处理模块用于采取如下方式对所述PSD图片进行二值化处理,确定所述PSD图片中的前景和背景:The automatic slicing device for a PSD picture according to claim 7, wherein the processing module is used to perform binarization processing on the PSD picture in the following manner to determine the foreground and background in the PSD picture:
    对所述PSD图片进行预处理;Preprocessing the PSD picture;
    对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景。Perform binarization processing on the preprocessed PSD picture, and determine the foreground and background in the PSD picture.
  12. 根据权利要求8所述的PSD图片的自动切片装置,其中,所述处理模块用于采取如下方式对所述PSD图片进行预处理:The automatic slicing device for PSD pictures according to claim 8, wherein the processing module is used to preprocess the PSD pictures in the following manner:
    对所述PSD图片进行灰度化处理;Perform grayscale processing on the PSD image;
    对灰度化处理后的PSD图片进行降噪和锐化处理。Noise reduction and sharpening are performed on the grayscaled PSD image.
  13. 根据权利要求12所述的PSD图片的自动切片装置,其中,所述处理模块用于采取如下方式对所述PSD图片进行灰度化处理:The automatic slicing device for PSD pictures according to claim 12, wherein the processing module is used to grayscale the PSD pictures in the following manner:
    将所述PSD图片中的每个像素的红黄蓝三色的值的平均值作为每个像素各自灰度化后的灰度值,或者将所述PSD图片中的每个像素的红黄蓝三色的值各自乘以不同的系数之后的和作为每个像素各自灰度化后的灰度值。The average value of the red, yellow, and blue values of each pixel in the PSD picture is used as the gray value of each pixel after graying, or the red, yellow, and blue values of each pixel in the PSD picture are The sum of the values of the three colors multiplied by different coefficients is used as the gray value of each pixel after graying.
  14. 根据权利要求12所述的PSD图片的自动切片装置,其中,所述处理模块用于采取如下方式对灰度化处理后的PSD图片进行降噪和锐化处理:The automatic slicing device for PSD pictures according to claim 12, wherein the processing module is used to perform noise reduction and sharpening processing on the grayscaled PSD pictures in the following manner:
    通过高斯滤波对灰度化处理后的PSD图片进行降噪,通过高通滤波对灰度化处理后的PSD图片进行锐化处理。The grayscaled PSD image is denoised by Gaussian filtering, and the grayscaled PSD image is sharpened by high pass filtering.
  15. 根据权利要求9所述的PSD图片的自动切片装置,其中,所述处理模块用于采取如下方式对预处理后的PSD图片进行二值化处理,确定所述PSD图片中的前景和背景:The automatic slicing device for a PSD picture according to claim 9, wherein the processing module is used to perform binarization processing on the preprocessed PSD picture in the following manner, to determine the foreground and background in the PSD picture:
    通过大津算法获得预处理后的PSD图片的二值化阈值;Obtain the binarization threshold of the preprocessed PSD image through the Otsu algorithm;
    根据所述二值化阈值对所述预处理后的PSD图片进行二值化处理。Perform binarization processing on the preprocessed PSD picture according to the binarization threshold.
  16. 根据权利要求10至15中任一项所述的PSD图片的自动切片装置,其中,所述提取模块用于采取如下方式通过图像分割算法提取所述前景和所述背景的分布信息:The automatic slicing device for PSD pictures according to any one of claims 10 to 15, wherein the extraction module is used to extract the distribution information of the foreground and the background through an image segmentation algorithm in the following manner:
    通过投影切割算法获得所述前景和所述背景的分布信息。The distribution information of the foreground and the background is obtained through a projection cutting algorithm.
  17. 根据权利要求16所述的PSD图片的自动切片装置,其中,所述分布信息是通过逐行扫描获得的所述前景和所述背景之间的上下边界线。The device for automatically slicing PSD pictures according to claim 16, wherein the distribution information is upper and lower boundary lines between the foreground and the background obtained through progressive scanning.
  18. 根据权利要求10至15中任一项所述的PSD图片的自动切片装置,其中,所述切片模块用于采取如下方式根据所述前景和所述背景的分布信息,对所述PSD图片进行切片:The automatic slicing device for PSD pictures according to any one of claims 10 to 15, wherein the slicing module is used to slice the PSD pictures according to the distribution information of the foreground and the background in the following manner :
    根据所述前景和所述背景的分布信息确定所述PSD图片的切割线;determining the cutting line of the PSD picture according to the distribution information of the foreground and the background;
    根据所述切割线,切割出所述前景,以将所述PSD图片切片。Cut out the foreground according to the cutting line, so as to slice the PSD picture.
  19. 一种PSD图片的自动切片装置,其中,所述装置包括存储器和处理器,所述存储器中存储有计算机程序,所述处理器执行所述计算机程序时,实现如权利要求1至9中任一项所述的方法。A device for automatically slicing PSD pictures, wherein the device includes a memory and a processor, and a computer program is stored in the memory, and when the processor executes the computer program, any one of claims 1 to 9 is realized. method described in the item.
  20. 一种计算机可读存储介质,其中,所述存储介质存储有计算机程序,所述计算机程序被执行时,实现如权利要求1至9中任一项所述的方法。A computer-readable storage medium, wherein the storage medium stores a computer program, and when the computer program is executed, the method according to any one of claims 1 to 9 is implemented.
PCT/CN2022/080388 2021-07-16 2022-03-11 Automatic slicing method and device for psd picture WO2023284313A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202110804654.XA CN113450365B (en) 2021-07-16 2021-07-16 Automatic slicing method and device for PSD (position sensitive Detector) picture
CN202110804654.X 2021-07-16

Publications (1)

Publication Number Publication Date
WO2023284313A1 true WO2023284313A1 (en) 2023-01-19

Family

ID=77816431

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/080388 WO2023284313A1 (en) 2021-07-16 2022-03-11 Automatic slicing method and device for psd picture

Country Status (2)

Country Link
CN (1) CN113450365B (en)
WO (1) WO2023284313A1 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113450365B (en) * 2021-07-16 2022-08-16 稿定(厦门)科技有限公司 Automatic slicing method and device for PSD (position sensitive Detector) picture

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105139415A (en) * 2015-09-29 2015-12-09 小米科技有限责任公司 Foreground and background segmentation method and apparatus of image, and terminal
CN105261021A (en) * 2015-10-19 2016-01-20 浙江宇视科技有限公司 Method and apparatus of removing foreground detection result shadows
CN105528784A (en) * 2015-12-02 2016-04-27 沈阳东软医疗系统有限公司 Method and device for segmenting foregrounds and backgrounds
JP6407467B1 (en) * 2018-05-21 2018-10-17 株式会社Gauss Image processing apparatus, image processing method, and program
CN110008954A (en) * 2019-03-29 2019-07-12 重庆大学 A kind of complex background text image extracting method and system based on multi threshold fusion
CN112381084A (en) * 2020-10-12 2021-02-19 武汉沃亿生物有限公司 Automatic contour recognition method for tomographic image
CN113450365A (en) * 2021-07-16 2021-09-28 稿定(厦门)科技有限公司 Automatic slicing method and device for PSD (position sensitive Detector) picture

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102214355B (en) * 2011-05-20 2013-04-03 西安工程大学 Cutout method of clothing display material
US9111444B2 (en) * 2012-10-31 2015-08-18 Raytheon Company Video and lidar target detection and tracking system and method for segmenting moving targets
CN110544281B (en) * 2019-08-19 2021-04-20 南斗六星系统集成有限公司 Picture batch compression method, medium, mobile terminal and device
CN111724396B (en) * 2020-06-17 2023-07-14 泰康保险集团股份有限公司 Image segmentation method and device, computer readable storage medium and electronic equipment
CN112001362A (en) * 2020-09-11 2020-11-27 汪秀英 Image analysis method, image analysis device and image analysis system

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105139415A (en) * 2015-09-29 2015-12-09 小米科技有限责任公司 Foreground and background segmentation method and apparatus of image, and terminal
CN105261021A (en) * 2015-10-19 2016-01-20 浙江宇视科技有限公司 Method and apparatus of removing foreground detection result shadows
CN105528784A (en) * 2015-12-02 2016-04-27 沈阳东软医疗系统有限公司 Method and device for segmenting foregrounds and backgrounds
JP6407467B1 (en) * 2018-05-21 2018-10-17 株式会社Gauss Image processing apparatus, image processing method, and program
CN110008954A (en) * 2019-03-29 2019-07-12 重庆大学 A kind of complex background text image extracting method and system based on multi threshold fusion
CN112381084A (en) * 2020-10-12 2021-02-19 武汉沃亿生物有限公司 Automatic contour recognition method for tomographic image
CN113450365A (en) * 2021-07-16 2021-09-28 稿定(厦门)科技有限公司 Automatic slicing method and device for PSD (position sensitive Detector) picture

Also Published As

Publication number Publication date
CN113450365B (en) 2022-08-16
CN113450365A (en) 2021-09-28

Similar Documents

Publication Publication Date Title
JP5844783B2 (en) Method for processing grayscale document image including text region, method for binarizing at least text region of grayscale document image, method and program for extracting table for forming grid in grayscale document image
CN110008954B (en) Complex background text image extraction method and system based on multi-threshold fusion
US8712188B2 (en) System and method for document orientation detection
Fan et al. Marginal noise removal of document images
US11295417B2 (en) Enhancing the legibility of images using monochromatic light sources
JP2008187709A (en) Method for classifying pixel and image processor
JP2008148298A (en) Method and apparatus for identifying regions of different content in image, and computer readable medium for embodying computer program for identifying regions of different content in image
JP2004126648A (en) Image processing method, image processor, and image processing program
EP2977932A2 (en) Image processing apparatus, image processing method and image processing program
WO2023284313A1 (en) Automatic slicing method and device for psd picture
US9064179B2 (en) Region extraction apparatus, region extraction method, and computer program product
US20160277613A1 (en) Image processing apparatus, region detection method and computer-readable, non-transitory medium
CN112308872A (en) Image edge detection method based on multi-scale Gabor first-order derivative
US11087126B2 (en) Method to improve performance in document processing
KR101082665B1 (en) Apparatus and method for extracting interest object
CN116363097A (en) Defect detection method and system for photovoltaic panel
Khan et al. Shadow removal from digital images using multi-channel binarization and shadow matting
Soua et al. Improved Hybrid Binarization based on Kmeans for Heterogeneous document processing
JP3533050B2 (en) Image area dividing device
CN114332866A (en) Document curve separation and coordinate information extraction method based on image processing
KR101528683B1 (en) Detecting method for excessive disparity object
JPH06339019A (en) Area separation system for document picture by discrete cosine transformation
JP2004152087A (en) Method and apparatus for extracting feature vector of image
US11778122B2 (en) Apparatus, method, and storage medium for removing shading dots
Kim et al. Colorization of mountainous landscape images in grayscale using texture feature analysis

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: 22840958

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE