[go: up one dir, main page]

CN109727232B - Method and apparatus for detecting dot area ratio of printing plate - Google Patents

Method and apparatus for detecting dot area ratio of printing plate Download PDF

Info

Publication number
CN109727232B
CN109727232B CN201811554335.2A CN201811554335A CN109727232B CN 109727232 B CN109727232 B CN 109727232B CN 201811554335 A CN201811554335 A CN 201811554335A CN 109727232 B CN109727232 B CN 109727232B
Authority
CN
China
Prior art keywords
image
pixels
pixel
value
area ratio
Prior art date
Legal status (The legal status 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 status listed.)
Active
Application number
CN201811554335.2A
Other languages
Chinese (zh)
Other versions
CN109727232A (en
Inventor
王文举
肖颖
刘骏
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Shanghai for Science and Technology
Original Assignee
University of Shanghai for Science and Technology
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 University of Shanghai for Science and Technology filed Critical University of Shanghai for Science and Technology
Priority to CN201811554335.2A priority Critical patent/CN109727232B/en
Publication of CN109727232A publication Critical patent/CN109727232A/en
Application granted granted Critical
Publication of CN109727232B publication Critical patent/CN109727232B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Image Analysis (AREA)

Abstract

The invention discloses a method and a device for detecting the dot area rate of a printing plate, wherein the method comprises the following steps: collecting a dot image of a printing plate; carrying out graying processing on the dot image to generate a grayscale image; binarizing the gray level image to generate a binarized image; filtering the binary image to generate a filtered image; and calculating the ratio of the number of the pixels representing the dots in the filtered image to the total number of the pixels in the filtered image to obtain the dot area rate of the printing plate. The invention reduces the complexity of the detection of the area rate of the printing dots of the printing plate, improves the detection speed and saves the time. In addition, the invention is beneficial to the miniaturization and the portability of the detection system of the dot area rate, and can be conveniently applied to the field proofing and verification of a flexographic printing system.

Description

印版的网点面积率的检测方法和设备Method and equipment for detecting dot area ratio of printing plate

技术领域technical field

本发明属于印版网点面积率的检测技术领域,尤其涉及一种印版的网点面积率的检测方法和设备。The invention belongs to the technical field of detecting the dot area ratio of printing plates, and in particular relates to a method and equipment for detecting the dot area ratio of printing plates.

背景技术Background technique

目前在计算印版的网点面积率的过程中,往往采用摄像头采集印版网点图像,然后,将网点图像传输至大型工作站,进行计算。由于大型工作站体积庞大,操作不便,运算复杂,成本很高,该中方案很难应用于柔版印刷系统现场打样和验证,不能实时给出印版的网点面积率。At present, in the process of calculating the dot area ratio of the printing plate, a camera is often used to collect the dot image of the printing plate, and then the dot image is transmitted to a large workstation for calculation. Due to the large size of large workstations, inconvenient operation, complex calculations, and high cost, this solution is difficult to apply to on-site proofing and verification of flexographic printing systems, and the dot area ratio of printing plates cannot be given in real time.

发明内容Contents of the invention

本发明实施例要解决的技术问题是为了克服现有技术的印版网点面积率的计算成本高、操作不便的缺陷,提供一种印版的网点面积率的检测方法和设备。The technical problem to be solved by the embodiments of the present invention is to provide a method and equipment for detecting the dot area ratio of the printing plate in order to overcome the defects of high calculation cost and inconvenient operation of the dot area ratio of the printing plate in the prior art.

本发明实施例是通过下述技术方案来解决上述技术问题:Embodiments of the present invention solve the above-mentioned technical problems through the following technical solutions:

本发明实施例提供一种印版的网点面积率的检测方法,包括以下步骤:The embodiment of the present invention provides a method for detecting the dot area ratio of a printing plate, comprising the following steps:

S1、采集印版的网点图像;S1, collecting the dot image of the printing plate;

S2、对网点图像进行灰度化处理,以生成灰度图像;S2. Perform grayscale processing on the dot image to generate a grayscale image;

S3、将灰度图像二值化,以生成二值化图像;S3. Binarize the grayscale image to generate a binarized image;

S4、对二值化图像进行滤波,以生成滤波后图像;S4. Filtering the binarized image to generate a filtered image;

S5、计算滤波后图像中表征网点的像素的数量与滤波后图像的像素的总数量的比值,以得到印版的网点面积率。S5. Calculate the ratio of the number of pixels representing dots in the filtered image to the total number of pixels in the filtered image to obtain the dot area ratio of the printing plate.

较佳地,网点图像为RGB色彩图像,步骤S2包括:Preferably, the dot image is an RGB color image, and step S2 includes:

根据以下公式对网点图像的每一个像素进行灰度化处理,Perform grayscale processing on each pixel of the dot image according to the following formula,

f=[0.395×R+0.641×G+0.234×B+0.5],其中,f为像素的灰度值,R为像素的红色通道的亮度值,G为像素的绿色通道的亮度值,B为像素的蓝色通道的亮度值。f=[0.395×R+0.641×G+0.234×B+0.5], wherein, f is the gray value of the pixel, R is the brightness value of the red channel of the pixel, G is the brightness value of the green channel of the pixel, and B is The brightness value of the pixel's blue channel.

较佳地,步骤S3包括:Preferably, step S3 includes:

采用大津法将灰度图像二值化。The grayscale image was binarized using the Otsu method.

较佳地,步骤S4包括:Preferably, step S4 includes:

以从左至右、从上至下的顺序依次对二值化图像的每一个像素进行如下处理:Each pixel of the binarized image is processed in sequence from left to right and from top to bottom as follows:

将像素的值替换为修正值,修正值为二值化图像中的所有的与像素相邻的像素的值相异或所得的值;与像素相邻的像素为像素的相邻的左侧、右侧、上侧、下侧的像素。Replace the value of the pixel with the correction value, and the correction value is the value obtained by the difference or the value of all the pixels adjacent to the pixel in the binarized image; the pixel adjacent to the pixel is the adjacent left side of the pixel, Pixels to the right, top, and bottom.

较佳地,表征网点的像素为值为1的像素。Preferably, the pixels representing the dots are pixels with a value of 1.

较佳地,在步骤S4和步骤S5之间,方法还包括以下步骤:Preferably, between step S4 and step S5, the method further includes the following steps:

计算滤波后图像的每一行像素中值为1的像素的数量Ni,i∈[1,r],其中r为滤波后图像的像素的行数;如果滤波后图像的第一行的值为1的像素的数量N1大于0并且小于等于Nj,j∈[2,r-1],则删除第一行;如果滤波后图像的最后一行的值为1的像素的数量Nr大于0并且小于等于Nj,j∈[2,r-1],则删除最后一行;Calculate the number of pixels with a value of 1 in each row of pixels of the filtered image Ni, i∈[1,r], where r is the number of rows of pixels in the filtered image; if the value of the first row of the filtered image is 1 The number of pixels N1 is greater than 0 and less than or equal to Nj, j∈[2,r-1], then delete the first line; if the number of pixels with a value of 1 in the last line of the filtered image Nr is greater than 0 and less than or equal to Nj , j∈[2,r-1], delete the last row;

计算滤波后图像的每一列像素中值为1的像素的数量Mk,k∈[1,c],其中c为滤波后图像的像素的l列数;如果滤波后图像的第一列的值为1的像素的数量M1大于0并且小于等于Mn,n∈[2,c-1],则删除第一列;如果滤波后图像的最后一列的值为1的像素的数量Mc大于0并且小于等于Mn,n∈[2,c-1],则删除最后一列;Calculate the number Mk of pixels with a value of 1 in each column of pixels of the filtered image, k ∈ [1, c], where c is the number of l columns of pixels in the filtered image; if the value of the first column of the filtered image is The number of pixels M1 of 1 is greater than 0 and less than or equal to Mn, n∈[2,c-1], then delete the first column; if the number of pixels Mc with a value of 1 in the last column of the filtered image is greater than 0 and less than or equal to Mn, n∈[2,c-1], delete the last column;

输出裁剪后图像;Output the cropped image;

步骤S5还包括:计算裁剪后图像的值为1的像素的数量占裁剪后图像的像素的总数量的百分比,以百分比作为印版的网点面积率。Step S5 further includes: calculating the percentage of the number of pixels with a value of 1 in the cropped image to the total number of pixels in the cropped image, and using the percentage as the dot area ratio of the printing plate.

本发明还提供一种便携式网点面积率的检测设备,包括一便携壳体、图像采集单元、灰度化处理单元、二值化单元、滤波单元、网点面积率计算单元;The present invention also provides a portable dot area ratio detection device, including a portable housing, an image acquisition unit, a grayscale processing unit, a binarization unit, a filter unit, and a dot area ratio calculation unit;

图像采集单元设置于便携壳体上,灰度化处理单元、二值化单元、滤波单元、网点面积率计算单元设置于便携壳体的内部;The image acquisition unit is arranged on the portable housing, and the grayscale processing unit, binarization unit, filter unit, and dot area ratio calculation unit are arranged inside the portable housing;

图像采集单元用于采集印版的网点图像;The image acquisition unit is used to acquire the dot image of the printing plate;

灰度化处理单元用于对网点图像进行灰度化处理,以生成灰度图像;The grayscale processing unit is used to grayscale the dot image to generate a grayscale image;

二值化单元用于将灰度图像二值化,以生成二值化图像;The binarization unit is used to binarize the grayscale image to generate a binarized image;

滤波单元用于对二值化图像进行滤波,以生成滤波后图像;The filtering unit is used to filter the binarized image to generate a filtered image;

网点面积率计算单元用于计算滤波后图像中表征网点的像素的数量与滤波后图像的像素的总数量的比值,以得到印版的网点面积率。The dot area ratio calculation unit is used to calculate the ratio of the number of pixels representing dots in the filtered image to the total number of pixels in the filtered image to obtain the dot area ratio of the printing plate.

较佳地,检测设备还包括显示单元,显示单元设置于便携壳体的外表面,显示单元用于显示印版的网点面积率。Preferably, the detection device further includes a display unit, the display unit is arranged on the outer surface of the portable casing, and the display unit is used to display the dot area ratio of the printing plate.

较佳地,图像采集单元包括CMOS(Complementary Metal Oxide Semiconductor,互补金属氧化物半导体)图像传感器,CMOS图像传感器的解析度为500万像素~2500万像素。Preferably, the image acquisition unit includes a CMOS (Complementary Metal Oxide Semiconductor, Complementary Metal Oxide Semiconductor) image sensor, and the resolution of the CMOS image sensor is 5 million pixels to 25 million pixels.

较佳地,检测设备还包括裁剪单元,裁剪单元设置于便携壳体的内部;Preferably, the detection device further includes a cutting unit, and the cutting unit is arranged inside the portable casing;

灰度化处理单元还用于根据以下公式对网点图像的每一个像素进行灰度化处理:The grayscale processing unit is also used to grayscale each pixel of the dot image according to the following formula:

f=[0.395×R+0.641×G+0.234×B+0.5],其中,f为像素的灰度值,R为像素的红色通道的亮度值,G为像素的绿色通道的亮度值,B为像素的蓝色通道的亮度值;f=[0.395×R+0.641×G+0.234×B+0.5], wherein, f is the gray value of the pixel, R is the brightness value of the red channel of the pixel, G is the brightness value of the green channel of the pixel, and B is the luminance value of the blue channel of the pixel;

二值化单元还用于采用大津法将灰度图像二值化;The binarization unit is also used to binarize the grayscale image by the Otsu method;

滤波单元还用于以从左至右、从上至下的顺序依次对二值化图像的每一个像素进行如下处理:将像素的值替换为修正值,修正值为二值化图像中的所有的与像素相邻的像素的值相异或所得的值;与像素相邻的像素为像素的相邻的左侧、右侧、上侧、下侧的像素;The filtering unit is also used to process each pixel of the binarized image sequentially from left to right and from top to bottom: replace the value of the pixel with a correction value, and the correction value is all The value of the pixel adjacent to the pixel is different or the value obtained; the pixel adjacent to the pixel is the pixel adjacent to the left, right, upper, and lower sides of the pixel;

裁剪单元用于计算滤波后图像的每一行像素中值为1的像素的数量Ni,i∈[1,r],其中r为滤波后图像的像素的行数;如果滤波后图像的第一行的值为1的像素的数量N1大于0并且小于等于Nj,j∈[2,r-1],则删除第一行;如果滤波后图像的最后一行的值为1的像素的数量Nr大于0并且小于等于Nj,j∈[2,r-1],则删除最后一行;The cropping unit is used to calculate the number of pixels with a value of 1 in each row of pixels of the filtered image Ni, i∈[1,r], where r is the number of rows of pixels in the filtered image; if the first row of the filtered image The number of pixels with a value of 1 N1 is greater than 0 and less than or equal to Nj, j∈[2,r-1], then delete the first row; if the number of pixels with a value of 1 in the last row of the filtered image Nr is greater than 0 And less than or equal to Nj, j∈[2,r-1], delete the last row;

裁剪单元还用于计算滤波后图像的每一列像素中值为1的像素的数量Mk,k∈[1,c],其中c为滤波后图像的像素的l列数;如果滤波后图像的第一列的值为1的像素的数量M1大于0并且小于等于Mn,n∈[2,c-1],则删除第一列;如果滤波后图像的最后一列的值为1的像素的数量Mc大于0并且小于等于Mn,n∈[2,c-1],则删除最后一列;The clipping unit is also used to calculate the number Mk of pixels with a value of 1 in each column of pixels of the filtered image, k ∈ [1, c], where c is the number of l columns of pixels in the filtered image; The number M1 of pixels with a value of 1 in a column is greater than 0 and less than or equal to Mn, n∈[2,c-1], then delete the first column; if the number of pixels with a value of 1 in the last column of the filtered image Mc Greater than 0 and less than or equal to Mn, n∈[2,c-1], delete the last column;

裁剪单元还用于输出裁剪后图像;The cropping unit is also used to output the cropped image;

网点面积率计算单元还用于计算裁剪后图像的值为1的像素的数量占裁剪后图像的像素的总数量的百分比,以百分比作为印版的网点面积率。The dot area ratio calculation unit is also used to calculate the percentage of the number of pixels with a value of 1 in the cropped image to the total number of pixels in the cropped image, and use the percentage as the dot area ratio of the printing plate.

本发明的积极进步效果在于:本发明降低了印版的网点面积率的检测的复杂度,提高了检测速度,节省了时间。并且,本发明有利于网点面积率的检测系统的小型化和便携性,可以方便地应用于柔版印刷系统现场打样和验证。The positive progress effect of the present invention lies in: the present invention reduces the detection complexity of the dot area ratio of the printing plate, improves the detection speed, and saves time. Moreover, the invention is beneficial to the miniaturization and portability of the detection system of the dot area ratio, and can be conveniently applied to on-site proofing and verification of a flexographic printing system.

附图说明Description of drawings

图1为本发明的实施例1的便携式网点面积率的检测设备的结构示意图。FIG. 1 is a schematic structural diagram of a portable dot area ratio detection device according to Embodiment 1 of the present invention.

图2为本发明的实施例1的便携式网点面积率的检测设备的滤波单元处理第一行第一列的像素的示意图。Fig. 2 is a schematic diagram of the processing of pixels in the first row and first column by the filter unit of the portable dot area ratio detection device according to Embodiment 1 of the present invention.

图3为本发明的实施例1的便携式网点面积率的检测设备的滤波单元处理第一行第二列的像素的示意图。Fig. 3 is a schematic diagram of processing pixels in the first row and the second column by the filter unit of the portable dot area ratio detection device according to Embodiment 1 of the present invention.

图4为本发明的实施例1的印版的网点面积率的检测方法的流程图。FIG. 4 is a flow chart of a method for detecting the dot area ratio of the printing plate according to Embodiment 1 of the present invention.

图5为本发明的实施例2的便携式网点面积率的检测设备的结构示意图。FIG. 5 is a schematic structural diagram of a portable dot area ratio detection device according to Embodiment 2 of the present invention.

图6为本发明的实施例2的印版的网点面积率的检测方法的流程图。FIG. 6 is a flow chart of a method for detecting the dot area ratio of a printing plate according to Embodiment 2 of the present invention.

具体实施方式Detailed ways

下面通过实施例的方式进一步说明本发明,但并不因此将本发明限制在所述的实施例范围之中。The present invention is further illustrated below by means of examples, but the present invention is not limited to the scope of the examples.

实施例1Example 1

本实施例提供一种便携式网点面积率的检测设备,参照图1,该检测设备包括一便携壳体(图中未示出)、图像采集单元101、灰度化处理单元102、二值化单元103、滤波单元104、网点面积率计算单元105。图像采集单元101设置于便携壳体上,灰度化处理单元102、二值化单元103、滤波单元104、网点面积率计算单元105设置于便携壳体的内部。The present embodiment provides a detection device of a portable dot area ratio. With reference to FIG. 103 , a filter unit 104 , and a dot area ratio calculation unit 105 . The image acquisition unit 101 is arranged on the portable housing, and the grayscale processing unit 102, the binarization unit 103, the filtering unit 104, and the dot area ratio calculation unit 105 are arranged inside the portable housing.

图像采集单元101用于采集印版的网点图像。灰度化处理单元102用于对网点图像进行灰度化处理,以生成灰度图像。二值化单元103用于将灰度图像二值化,以生成二值化图像。滤波单元104用于对二值化图像进行滤波,以生成滤波后图像。网点面积率计算单元105用于计算滤波后图像中表征网点的像素的数量与滤波后图像的像素的总数量的比值,以得到印版的网点面积率。The image acquisition unit 101 is used to acquire the dot image of the printing plate. The grayscale processing unit 102 is configured to perform grayscale processing on the dot image to generate a grayscale image. The binarization unit 103 is used to binarize the grayscale image to generate a binarized image. The filtering unit 104 is used for filtering the binarized image to generate a filtered image. The dot area ratio calculation unit 105 is used to calculate the ratio of the number of pixels representing dots in the filtered image to the total number of pixels in the filtered image to obtain the dot area ratio of the printing plate.

使用本实施例的便携式网点面积率的检测设备时,用户可以手持该检测设备,对柔版印刷系统进行现场打样,由图像采集单元101采集印版的网点图像。在本实施例中,图像采集单元采用CMOS图像传感器,该CMOS图像传感器的解析度为1000万像素。在其他可选的实施方式中,图像采集单元可以采用CCD(电荷耦合器件)图像传感器,图像采集单元的解析度的较佳范围为500万像素~2500万像素。When using the portable dot area ratio detection device of this embodiment, the user can hold the detection device to perform on-site proofing of the flexographic printing system, and the image acquisition unit 101 collects the dot image of the printing plate. In this embodiment, the image acquisition unit adopts a CMOS image sensor, and the resolution of the CMOS image sensor is 10 million pixels. In other optional implementation manners, the image acquisition unit may use a CCD (Charge Coupled Device) image sensor, and the resolution of the image acquisition unit preferably ranges from 5 million pixels to 25 million pixels.

然后,灰度化处理单元102对网点图像进行灰度化处理。在本实施例中,灰度化处理单元102根据以下公式对网点图像的每一个像素进行灰度化处理:Then, the grayscale processing unit 102 performs grayscale processing on the halftone dot image. In this embodiment, the grayscale processing unit 102 performs grayscale processing on each pixel of the dot image according to the following formula:

f=[0.395×R+0.641×G+0.234×B+0.5],其中,f为像素的灰度值,R为像素的红色通道的亮度值,G为像素的绿色通道的亮度值,B为像素的蓝色通道的亮度值。该灰度化处理方法可以提高后续处理的精度。灰度化处理后,得到灰度图像。f=[0.395×R+0.641×G+0.234×B+0.5], wherein, f is the gray value of the pixel, R is the brightness value of the red channel of the pixel, G is the brightness value of the green channel of the pixel, and B is The brightness value of the pixel's blue channel. The grayscale processing method can improve the accuracy of subsequent processing. After grayscale processing, a grayscale image is obtained.

接下来,二值化单元103将灰度图像二值化,以生成二值化图像。在本实施例中,二值化单元103采用大津法将灰度图像二值化。灰度图像中的每一个像素具有灰度值f,即其灰度级为f(根据f可以将一幅图分为前景点像素和背景点像素。前景点像素指所有灰度级低于等于t*的像素点,背景点像素指大于t*的像素点,t*为前景与背景的二值化分割阈值)。前景点像素占灰度图像总像素的比例可记为w0,前景点像素的像素值的均值记为u0,背景点像素占灰度图像总像素的比例可记为w1,背景点像素的像素值的均值记为u1。则整个灰度图像的像素的均值记为u=w0*u0+w1*u1。构建目标函数g(t)=w0*(u0-u)^2+w1*(u1-u)^2。计算g(t),当g(t)为最大时所对应的t可确定为二值化分割阈值t*。灰度图像中灰度值大于二值化分割阈值t*的像素的值标记为1,灰度图像中灰度值不大于二值化分割阈值t*的像素的值标记为0,从而得到二值化图像。经过二值化处理,每一个像素只需要一位二进制数即可表征,大大减少了后续处理的运算量。Next, the binarization unit 103 binarizes the grayscale image to generate a binarized image. In this embodiment, the binarization unit 103 uses the Otsu method to binarize the grayscale image. Each pixel in the grayscale image has a grayscale value f, that is, its grayscale is f (according to f, a picture can be divided into foreground point pixels and background point pixels. Foreground point pixels refer to all gray levels below or equal to The pixel point of t*, the background point pixel refers to the pixel point greater than t*, t* is the binary segmentation threshold of foreground and background). The proportion of the foreground pixel to the total grayscale image can be recorded as w0, the average value of the foreground pixel’s pixel value can be recorded as u0, the proportion of the background pixel to the total grayscale image can be recorded as w1, and the pixel value of the background pixel can be The mean value of is denoted as u1. Then the mean value of the pixels of the entire grayscale image is recorded as u=w0*u0+w1*u1. Construct the objective function g(t)=w0*(u0-u)^2+w1*(u1-u)^2. Calculate g(t), and when g(t) is the maximum, the corresponding t can be determined as the binarized segmentation threshold t*. In the grayscale image, the value of the pixel whose grayscale value is greater than the binarization segmentation threshold t* is marked as 1, and the value of the pixel whose grayscale value is not greater than the binarization segmentation threshold t* in the grayscale image is marked as 0, so that the binary Value image. After binarization processing, each pixel only needs one binary number to represent, which greatly reduces the amount of computation for subsequent processing.

然后,滤波单元104对二值化图像进行滤波,以生成滤波后图像。在本实施例中,滤波单元104以从左至右、从上至下的顺序依次对二值化图像的每一个像素进行如下处理:将像素的值替换为修正值,修正值为二值化图像中的所有的与像素相邻的像素的值相异或所得的值;与像素相邻的像素为像素的相邻的左侧、右侧、上侧、下侧的像素。图2示出了二值化图像的左上角的部分像素。滤波时,首先对二值化图像的第一行第一列的第一像素P1进行处理,第一像素P1的左侧和上侧没有像素,第一像素P1的相邻的像素为其右侧的第二像素P2和其下侧的第三像素P3。第二像素P2的像素值0和第三像素P3的像素值1相异或,得到1,则如图3所示,第一像素P1的值被替换为1。然后,对下一个像素第二像素P2进行处理。第二像素P2的相邻的像素为其左侧的第一像素P1、其右侧的第四像素P4、其下侧的第五像素P5,三者异或得到0,于是第二像素P2的值保持为0不变。然后,对第四像素P4进行处理。当处理完第一行的最后一个像素,处理第二行的第一个像素(第三像素P3)。依次类推,直至将二值化图像的所有像素均处理完毕,得到滤波后图像。经过滤波,去除了二值化图像中的噪声,可以提高网点面积率的检测精度。Then, the filtering unit 104 filters the binarized image to generate a filtered image. In this embodiment, the filtering unit 104 sequentially processes each pixel of the binarized image from left to right and from top to bottom as follows: replace the value of the pixel with a correction value, and the correction value is binarized The values of all the pixels adjacent to the pixel in the image are different or obtained; the pixels adjacent to the pixel are the pixels adjacent to the left, right, upper, and lower sides of the pixel. Fig. 2 shows some pixels in the upper left corner of the binarized image. When filtering, the first pixel P1 in the first row and first column of the binarized image is first processed, there are no pixels on the left and upper sides of the first pixel P1, and the adjacent pixels of the first pixel P1 are on the right side The second pixel P2 and the third pixel P3 below it. The pixel value 0 of the second pixel P2 is exclusive ORed with the pixel value 1 of the third pixel P3 to obtain 1, then as shown in FIG. 3 , the value of the first pixel P1 is replaced with 1. Then, the next pixel, the second pixel P2, is processed. The adjacent pixels of the second pixel P2 are the first pixel P1 on the left, the fourth pixel P4 on the right, and the fifth pixel P5 on the lower side. The value remains unchanged at 0. Then, the fourth pixel P4 is processed. When the last pixel of the first row is processed, the first pixel of the second row (third pixel P3) is processed. And so on, until all the pixels of the binarized image are processed, and the filtered image is obtained. After filtering, the noise in the binarized image is removed, which can improve the detection accuracy of the dot area ratio.

接下来,网点面积率计算单元105统计滤波后图像中表征网点的像素(即值为1的像素)的数量和滤波后图像中像素的总数量,并计算前者占后者的百分比,该百分比即为印版的网点面积率。Next, the dot area ratio calculation unit 105 counts the number of pixels representing dots (i.e., pixels with a value of 1) in the filtered image and the total number of pixels in the filtered image, and calculates the percentage of the former accounting for the latter, which is is the dot area ratio of the printing plate.

本实施例的便携式网点面积率的检测设备降低了印版的网点面积率的检测的复杂度,提高了检测速度,节省了时间。并且,由于降低了计算复杂度,本实施例的灰度化处理单元、二值化单元、滤波单元、网点面积率计算单元可以集成在一个CPU(中央处理器)中,从而实现小型化、便携式的设计,可以方便地应用于柔版印刷系统现场打样和验证。The portable dot area ratio detection device of this embodiment reduces the complexity of the detection of the dot area ratio of the printing plate, improves the detection speed, and saves time. And, because the computational complexity is reduced, the grayscale processing unit, binarization unit, filtering unit, and dot area ratio calculation unit of this embodiment can be integrated in one CPU (central processing unit), thereby realizing miniaturization and portable The design can be easily applied to flexographic printing system on-site proofing and verification.

本实施例还提供一种印版的网点面积率的检测方法,该检测方法采用本实施例的便携式网点面积率的检测设备实现,参照图4,该检测方法包括以下步骤:Present embodiment also provides a kind of detection method of the dot area ratio of printing plate, this detection method adopts the detection equipment of portable dot area ratio of the present embodiment to realize, with reference to Fig. 4, this detection method comprises the following steps:

步骤S201、采集印版的网点图像;Step S201, collecting the dot image of the printing plate;

步骤S202、对网点图像进行灰度化处理,以生成灰度图像;Step S202, performing grayscale processing on the dot image to generate a grayscale image;

步骤S203、将灰度图像二值化,以生成二值化图像;Step S203, binarize the grayscale image to generate a binarized image;

步骤S204、对二值化图像进行滤波,以生成滤波后图像;Step S204, filtering the binarized image to generate a filtered image;

步骤S205、计算滤波后图像中表征网点的像素的数量与滤波后图像的像素的总数量的比值,以得到印版的网点面积率。Step S205 , calculating the ratio of the number of pixels representing dots in the filtered image to the total number of pixels in the filtered image to obtain the dot area ratio of the printing plate.

在步骤S201中,由图像采集单元101采集印版的网点图像。In step S201 , the dot image of the printing plate is captured by the image capture unit 101 .

在步骤S202中,灰度化处理单元102根据以下公式对网点图像的每一个像素进行灰度化处理:In step S202, the grayscale processing unit 102 performs grayscale processing on each pixel of the dot image according to the following formula:

f=[0.395×R+0.641×G+0.234×B+0.5],其中,f为像素的灰度值,R为像素的红色通道的亮度值,G为像素的绿色通道的亮度值,B为像素的蓝色通道的亮度值。该灰度化处理方法可以提高后续处理的精度。灰度化处理后,得到灰度图像。f=[0.395×R+0.641×G+0.234×B+0.5], wherein, f is the gray value of the pixel, R is the brightness value of the red channel of the pixel, G is the brightness value of the green channel of the pixel, and B is The brightness value of the pixel's blue channel. The grayscale processing method can improve the accuracy of subsequent processing. After grayscale processing, a grayscale image is obtained.

在步骤S203中,二值化单元103采用大津法将灰度图像二值化。灰度图像中的每一个像素具有灰度值f,即其灰度级为f(根据f可以将一幅图分为前景点像素和背景点像素。前景点像素指所有灰度级低于等于t*的像素点,背景点像素指大于t*的像素点,t*为前景与背景的二值化分割阈值)。前景点像素占灰度图像总像素的比例可记为w0,前景点像素的像素值的均值记为u0,背景点像素占灰度图像总像素的比例可记为w1,背景点像素的像素值的均值记为u1。则整个灰度图像的像素的均值记为u=w0*u0+w1*u1。构建目标函数g(t)=w0*(u0-u)^2+w1*(u1-u)^2。计算g(t),当g(t)为最大时所对应的t可确定为二值化分割阈值t*。灰度图像中灰度值大于二值化分割阈值t*的像素的值标记为1,灰度图像中灰度值不大于二值化分割阈值t*的像素的值标记为0,从而得到二值化图像。经过二值化处理,每一个像素只需要一位二进制数即可表征,大大减少了后续处理的运算量。In step S203, the binarization unit 103 binarizes the grayscale image using the Otsu method. Each pixel in the grayscale image has a grayscale value f, that is, its grayscale is f (according to f, a picture can be divided into foreground point pixels and background point pixels. Foreground point pixels refer to all gray levels below or equal to The pixel point of t*, the background point pixel refers to the pixel point greater than t*, t* is the binary segmentation threshold of foreground and background). The proportion of the foreground pixel to the total grayscale image can be recorded as w0, the average value of the foreground pixel’s pixel value can be recorded as u0, the proportion of the background pixel to the total grayscale image can be recorded as w1, and the pixel value of the background pixel can be The mean value of is denoted as u1. Then the mean value of the pixels of the entire grayscale image is recorded as u=w0*u0+w1*u1. Construct the objective function g(t)=w0*(u0-u)^2+w1*(u1-u)^2. Calculate g(t), and when g(t) is the maximum, the corresponding t can be determined as the binarized segmentation threshold t*. In the grayscale image, the value of the pixel whose grayscale value is greater than the binarization segmentation threshold t* is marked as 1, and the value of the pixel whose grayscale value is not greater than the binarization segmentation threshold t* in the grayscale image is marked as 0, so that the binary Value image. After binarization processing, each pixel only needs one binary number to represent, which greatly reduces the amount of computation for subsequent processing.

在步骤S204中,滤波单元104以从左至右、从上至下的顺序依次对二值化图像的每一个像素进行如下处理:将像素的值替换为修正值,修正值为二值化图像中的所有的与像素相邻的像素的值相异或所得的值;与像素相邻的像素为像素的相邻的左侧、右侧、上侧、下侧的像素。图2示出了二值化图像的左上角的部分像素。滤波时,首先对二值化图像的第一行第一列的第一像素P1进行处理,第一像素P1的左侧和上侧没有像素,第一像素P1的相邻的像素为其右侧的第二像素P2和其下侧的第三像素P3。第二像素P2的像素值0和第三像素P3的像素值1相异或,得到1,则如图3所示,第一像素P1的值被替换为1。然后,对下一个像素第二像素P2进行处理。第二像素P2的相邻的像素为其左侧的第一像素P1、其右侧的第四像素P4、其下侧的第五像素P5,三者异或得到0,于是第二像素P2的值保持为0不变。然后,对第四像素P4进行处理。当处理完第一行的最后一个像素,处理第二行的第一个像素(第三像素P3)。依次类推,直至将二值化图像的所有像素均处理完毕,得到滤波后图像。经过滤波,去除了二值化图像中的噪声,可以提高网点面积率的检测精度。In step S204, the filtering unit 104 performs the following processing on each pixel of the binarized image sequentially from left to right and from top to bottom: replace the value of the pixel with a correction value, and the correction value is the binary image The values of all the pixels adjacent to the pixel in are different or the obtained value; the pixels adjacent to the pixel are the pixels adjacent to the left, right, upper, and lower sides of the pixel. Fig. 2 shows some pixels in the upper left corner of the binarized image. When filtering, the first pixel P1 in the first row and first column of the binarized image is first processed, there are no pixels on the left and upper sides of the first pixel P1, and the adjacent pixels of the first pixel P1 are on the right side The second pixel P2 and the third pixel P3 below it. The pixel value 0 of the second pixel P2 is exclusive ORed with the pixel value 1 of the third pixel P3 to obtain 1, then as shown in FIG. 3 , the value of the first pixel P1 is replaced with 1. Then, the next pixel, the second pixel P2, is processed. The adjacent pixels of the second pixel P2 are the first pixel P1 on the left, the fourth pixel P4 on the right, and the fifth pixel P5 on the lower side. The value remains unchanged at 0. Then, the fourth pixel P4 is processed. When the last pixel of the first row is processed, the first pixel of the second row (third pixel P3) is processed. And so on, until all the pixels of the binarized image are processed, and the filtered image is obtained. After filtering, the noise in the binarized image is removed, which can improve the detection accuracy of the dot area ratio.

在步骤S205中,网点面积率计算单元105统计滤波后图像中表征网点的像素(即值为1的像素)的数量和滤波后图像中像素的总数量,并计算前者占后者的百分比,该百分比即为印版的网点面积率。In step S205, the network dot area ratio calculation unit 105 counts the number of pixels representing network dots (i.e., pixels with a value of 1) in the filtered image and the total number of pixels in the filtered image, and calculates the percentage of the former accounting for the latter, the The percentage is the dot area ratio of the printing plate.

实施例2Example 2

在实施例1的便携式网点面积率的检测设备的基础上,本实施例提供一种便携式网点面积率的检测设备,参照图2,该检测设备还包括裁剪单元106、显示单元107。裁剪单元106设置于便携壳体的内部,显示单元107设置于便携壳体的外表面。显示单元107用于显示印版的网点面积率。On the basis of the detection device for the portable dot area ratio in embodiment 1, this embodiment provides a portable dot area ratio detection device. Referring to FIG. 2 , the detection device further includes a cutting unit 106 and a display unit 107 . The cutting unit 106 is disposed inside the portable housing, and the display unit 107 is disposed on the outer surface of the portable housing. The display unit 107 is used to display the dot area ratio of the printing plate.

裁剪单元106用于计算滤波后图像的每一行像素中值为1的像素的数量Ni,i∈[1,r],其中r为滤波后图像的像素的行数;如果滤波后图像的第一行的值为1的像素的数量N1大于0并且小于等于Nj,j∈[2,r-1],则删除第一行;如果滤波后图像的最后一行的值为1的像素的数量Nr大于0并且小于等于Nj,j∈[2,r-1],则删除最后一行;裁剪单元还用于计算滤波后图像的每一列像素中值为1的像素的数量Mk,k∈[1,c],其中c为滤波后图像的像素的l列数;如果滤波后图像的第一列(最左侧一列)的值为1的像素的数量M1大于0并且小于等于Mn,n∈[2,c-1],则删除第一列;如果滤波后图像的最后一列(最右侧一列)的值为1的像素的数量Mc大于0并且小于等于Mn,n∈[2,c-1],则删除最后一列;裁剪单元还用于输出裁剪后图像。也即,裁剪单元106接收滤波单元104输出的滤波后图像,计算滤波后图像的每一行像素中值为1的像素的数量。滤波后图像的第一行的值为1的像素的数量N1不等于0,则将滤波后图像的第一行的值为1的像素的数量N1逐一与除第一行和最后一行以外的其他各行的值为1的像素的数量Nj(j∈[2,r-1])比较,如果N1不大于Nj(j∈[2,r-1])中最小的一个,则判定滤波后图像上方边缘处的网格不完整,对于网点面积率的检测的参考价值较低,于是将滤波后图像的第一行删除。在对第一行进行判断的同时,裁剪单元106还按照类似的方法判断最后一行是否需要删除,裁剪单元106还按照前述方法判断滤波后图像的最左侧一列和最右侧一列是否需要删除。判断完成后,裁剪单元106对滤波后图像中满足删除条件的行或列进行删除,即完成对滤波后图像的裁剪操作,输出裁剪后图像。在其他可选的实施方式中,裁剪单元可以先对滤波后图像的第一行和最后一行进行判断,然后进行相应的删除操作,得到一个中间图像;然后裁剪单元对中间图像的最左侧一列和最右侧一列进行判断,进行相应的删除操作,最终输出裁剪后图像。或者,裁剪单元可以先对滤波后图像的最左侧一列和最右侧一列进行判断,然后进行相应的删除操作,得到一个中间图像;然后裁剪单元对中间图像的第一行和最后一行进行判断,进行相应的删除操作,最终输出裁剪后图像。Cutting unit 106 is used for calculating the quantity Ni of the pixel that value is 1 in each row of pixels of the filtered image, i∈[1, r], wherein r is the row number of the pixel of the filtered image; if the first filtered image The number N1 of pixels with a value of 1 in the row is greater than 0 and less than or equal to Nj, j∈[2,r-1], then delete the first row; if the number of pixels with a value of 1 in the last row of the filtered image Nr is greater than 0 and less than or equal to Nj, j∈[2,r-1], delete the last row; the clipping unit is also used to calculate the number of pixels with a value of 1 in each column of the filtered image Mk, k∈[1,c ], where c is the number of l columns of pixels in the filtered image; if the number M1 of pixels whose value is 1 in the first column (the leftmost column) of the filtered image is greater than 0 and less than or equal to Mn, n∈[2, c-1], delete the first column; if the number Mc of pixels with a value of 1 in the last column (the rightmost column) of the filtered image is greater than 0 and less than or equal to Mn, n∈[2,c-1], then delete the last column; the cropping unit is also used to output the cropped image. That is, the cropping unit 106 receives the filtered image output by the filtering unit 104, and calculates the number of pixels with a value of 1 in each row of pixels of the filtered image. The number N1 of pixels whose value is 1 in the first row of the filtered image is not equal to 0, then the number N1 of pixels whose value is 1 in the first row of the filtered image is one by one with other than the first row and the last row The number Nj(j∈[2,r-1]) of pixels with a value of 1 in each row is compared, and if N1 is not greater than the smallest one of Nj(j∈[2,r-1]), then it is determined that the filtered image is above The grid at the edge is incomplete, and the reference value for the detection of the dot area ratio is low, so the first line of the filtered image is deleted. While judging the first row, the cropping unit 106 also judges whether the last row needs to be deleted according to a similar method, and the cropping unit 106 also judges whether the leftmost column and the rightmost column of the filtered image need to be deleted according to the aforementioned method. After the judgment is completed, the cropping unit 106 deletes the rows or columns satisfying the deletion condition in the filtered image, that is, completes the cropping operation on the filtered image, and outputs the cropped image. In other optional implementation manners, the cropping unit can first judge the first row and the last row of the filtered image, and then perform a corresponding deletion operation to obtain an intermediate image; Judge with the rightmost column, perform the corresponding deletion operation, and finally output the cropped image. Alternatively, the cropping unit can first judge the leftmost column and the rightmost column of the filtered image, and then perform corresponding deletion operations to obtain an intermediate image; then the cropping unit judges the first row and the last row of the intermediate image , perform the corresponding deletion operation, and finally output the cropped image.

然后,网点面积率计算单元105统计裁剪后图像的值为1的像素的数量和裁剪后图像的像素的总数量,并计算裁剪后图像的值为1的像素的数量占裁剪后图像的像素的总数量的百分比,以该百分比作为印版的网点面积率。经过裁剪操作,排除了不完整的网格的干扰,最终得到的印版的网点面积率更加准确。Then, the dot area ratio calculation unit 105 counts the number of pixels with a value of 1 in the image after cropping and the total number of pixels in the image after cropping, and calculates the number of pixels with a value of 1 in the image after cropping to account for the number of pixels in the image after cropping The percentage of the total quantity, which is used as the dot area ratio of the printing plate. After the cutting operation, the interference of incomplete grids is eliminated, and the dot area ratio of the final printing plate is more accurate.

显示单元107显示印版的网点面积率,还显示印版的网点图像供用户参考。The display unit 107 displays the dot area ratio of the printing plate, and also displays the dot image of the printing plate for user reference.

在实施例1的印版的网点面积率的检测方法的基础上,本实施例还提供一种印版的网点面积率的检测方法,该检测方法采用本实施例的便携式网点面积率的检测设备实现,参照图6,该检测方法包括以下步骤:On the basis of the detection method of the dot area ratio of the printing plate in embodiment 1, this embodiment also provides a detection method of the dot area ratio of the printing plate, the detection method adopts the detection device of the portable dot area ratio of the present embodiment Realize, with reference to Fig. 6, this detection method comprises the following steps:

步骤S201、采集印版的网点图像。Step S201, collecting the dot image of the printing plate.

步骤S202、对网点图像进行灰度化处理,以生成灰度图像。Step S202, performing grayscale processing on the dot image to generate a grayscale image.

步骤S203、将灰度图像二值化,以生成二值化图像。Step S203, binarize the grayscale image to generate a binarized image.

步骤S204、对二值化图像进行滤波,以生成滤波后图像。Step S204, filter the binarized image to generate a filtered image.

步骤S2041、判断滤波后图像的边缘是否符合删除条件,若是,则进行删除,输出裁剪后图像。Step S2041 , judging whether the edge of the filtered image meets the deletion condition, if so, delete it, and output the cropped image.

步骤S205包括步骤S2051、计算裁剪后图像的值为1的像素的数量占裁剪后图像的像素的总数量的百分比,以百分比作为印版的网点面积率。Step S205 includes step S2051, calculating the percentage of the number of pixels with a value of 1 in the cropped image to the total number of pixels in the cropped image, and using the percentage as the dot area ratio of the printing plate.

步骤S206、显示印版的网点面积率。Step S206, displaying the dot area ratio of the printing plate.

具体实施时,在步骤S2041中,裁剪单元106计算滤波后图像的每一行像素中值为1的像素的数量Ni,i∈[1,r],其中r为滤波后图像的像素的行数;如果滤波后图像的第一行的值为1的像素的数量N1大于0并且小于等于Nj,j∈[2,r-1],则删除第一行;如果滤波后图像的最后一行的值为1的像素的数量Nr大于0并且小于等于Nj,j∈[2,r-1],则删除最后一行;裁剪单元还用于计算滤波后图像的每一列像素中值为1的像素的数量Mk,k∈[1,c],其中c为滤波后图像的像素的l列数;如果滤波后图像的第一列的值为1的像素的数量M1大于0并且小于等于Mn,n∈[2,c-1],则删除第一列;如果滤波后图像的最后一列的值为1的像素的数量Mc大于0并且小于等于Mn,n∈[2,c-1],则删除最后一列;裁剪单元还用于输出裁剪后图像。也即,裁剪单元106接收滤波单元104输出的滤波后图像,计算滤波后图像的每一行像素中值为1的像素的数量。滤波后图像的第一行的值为1的像素的数量N1不等于0,则将滤波后图像的第一行的值为1的像素的数量N1逐一与除第一行和最后一行以外的其他各行的值为1的像素的数量Nj(j∈[2,r-1])比较,如果N1不大于Nj(j∈[2,r-1])中最小的一个,则判定滤波后图像上方边缘处的网格不完整,对于网点面积率的检测的参考价值较低,于是将滤波后图像的第一行删除。在对第一行进行判断的同时,裁剪单元106还按照类似的方法判断最后一行是否需要删除,裁剪单元106还按照前述方法判断滤波后图像的最左侧一列和最右侧一列是否需要删除。判断完成后,裁剪单元106对滤波后图像中满足删除条件的行或列进行删除,即完成对滤波后图像的裁剪操作,输出裁剪后图像。在其他可选的实施方式中,裁剪单元可以先对滤波后图像的第一行和最后一行进行判断,然后进行相应的删除操作,得到一个中间图像;然后裁剪单元对中间图像的最左侧一列和最右侧一列进行判断,进行相应的删除操作,最终输出裁剪后图像。或者,裁剪单元可以先对滤波后图像的最左侧一列和最右侧一列进行判断,然后进行相应的删除操作,得到一个中间图像;然后裁剪单元对中间图像的第一行和最后一行进行判断,进行相应的删除操作,最终输出裁剪后图像。During specific implementation, in step S2041, the clipping unit 106 calculates the number Ni of pixels with a value of 1 in each row of pixels of the filtered image, i∈[1, r], where r is the number of rows of pixels in the filtered image; If the number N1 of pixels whose value is 1 in the first line of the filtered image is greater than 0 and less than or equal to Nj, j∈[2,r-1], then delete the first line; if the value of the last line of the filtered image is The number of pixels Nr of 1 is greater than 0 and less than or equal to Nj, j∈[2,r-1], then delete the last row; the cropping unit is also used to calculate the number of pixels with a value of 1 in each column of pixels of the filtered image Mk , k∈[1,c], where c is the l column number of pixels in the filtered image; if the number M1 of pixels whose value is 1 in the first column of the filtered image is greater than 0 and less than or equal to Mn, n∈[2 , c-1], then delete the first column; if the number Mc of pixels with a value of 1 in the last column of the filtered image is greater than 0 and less than or equal to Mn, n∈[2,c-1], then delete the last column; The cropping unit is also used to output cropped images. That is, the cropping unit 106 receives the filtered image output by the filtering unit 104, and calculates the number of pixels with a value of 1 in each row of pixels of the filtered image. The number N1 of pixels whose value is 1 in the first row of the filtered image is not equal to 0, then the number N1 of pixels whose value is 1 in the first row of the filtered image is one by one with other than the first row and the last row The number Nj(j∈[2,r-1]) of pixels with a value of 1 in each row is compared, and if N1 is not greater than the smallest one of Nj(j∈[2,r-1]), then it is determined that the filtered image is above The grid at the edge is incomplete, and the reference value for the detection of the dot area ratio is low, so the first line of the filtered image is deleted. While judging the first row, the cropping unit 106 also judges whether the last row needs to be deleted according to a similar method, and the cropping unit 106 also judges whether the leftmost column and the rightmost column of the filtered image need to be deleted according to the aforementioned method. After the judgment is completed, the cropping unit 106 deletes the rows or columns satisfying the deletion condition in the filtered image, that is, completes the cropping operation on the filtered image, and outputs the cropped image. In other optional implementation manners, the cropping unit can first judge the first row and the last row of the filtered image, and then perform a corresponding deletion operation to obtain an intermediate image; Judge with the rightmost column, perform the corresponding deletion operation, and finally output the cropped image. Alternatively, the cropping unit can first judge the leftmost column and the rightmost column of the filtered image, and then perform a corresponding deletion operation to obtain an intermediate image; then the cropping unit judges the first row and the last row of the intermediate image , perform the corresponding deletion operation, and finally output the cropped image.

然后,在步骤S2051中,网点面积率计算单元105统计裁剪后图像的值为1的像素的数量和裁剪后图像的像素的总数量,并计算裁剪后图像的值为1的像素的数量占裁剪后图像的像素的总数量的百分比,以该百分比作为印版的网点面积率。经过裁剪操作,排除了不完整的网格的干扰,最终得到的印版的网点面积率更加准确。Then, in step S2051, the dot area ratio calculation unit 105 counts the number of pixels with a value of 1 in the cropped image and the total number of pixels in the cropped image, and calculates the percentage of the number of pixels with a value of 1 in the cropped image to account for the cropped image. The percentage of the total number of pixels in the post image, which is used as the dot area ratio of the printing plate. After the cutting operation, the interference of incomplete grids is eliminated, and the dot area ratio of the final printing plate is more accurate.

最后,在步骤S206中,显示单元107显示印版的网点面积率,还显示印版的网点图像供用户参考。Finally, in step S206, the display unit 107 displays the dot area ratio of the printing plate, and also displays the dot image of the printing plate for user reference.

虽然以上描述了本发明的具体实施方式,但是本领域的技术人员应当理解,这些仅是举例说明,本发明的保护范围是由所附权利要求书限定的。本领域的技术人员在不背离本发明的原理和实质的前提下,可以对这些实施方式做出多种变更或修改,但这些变更和修改均落入本发明的保护范围。Although the specific embodiments of the present invention have been described above, those skilled in the art should understand that these are only examples, and the protection scope of the present invention is defined by the appended claims. Those skilled in the art can make various changes or modifications to these embodiments without departing from the principle and essence of the present invention, but these changes and modifications all fall within the protection scope of the present invention.

Claims (8)

1.一种印版的网点面积率的检测方法,其特征在于,包括以下步骤:1. a detection method of the dot area ratio of printing plate, is characterized in that, comprises the following steps: S1、采集所述印版的网点图像;S1. Collecting the dot image of the printing plate; S2、对所述网点图像进行灰度化处理,以生成灰度图像;S2. Perform grayscale processing on the dot image to generate a grayscale image; S3、将所述灰度图像二值化,以生成二值化图像;S3. Binarize the grayscale image to generate a binarized image; S4、对所述二值化图像进行滤波,以生成滤波后图像;S4. Filter the binarized image to generate a filtered image; S5、计算所述滤波后图像中表征网点的像素的数量与所述滤波后图像的像素的总数量的比值,以得到所述印版的网点面积率;S5. Calculate the ratio of the number of pixels representing dots in the filtered image to the total number of pixels in the filtered image to obtain the dot area ratio of the printing plate; 步骤S4包括:Step S4 includes: 以从左至右、从上至下的顺序依次对所述二值化图像的每一个像素进行如下处理:Each pixel of the binarized image is processed as follows in order from left to right and from top to bottom: 将所述像素的值替换为修正值,所述修正值为所述二值化图像中的所有的与所述像素相邻的像素的值相异或所得的值;与所述像素相邻的像素为所述像素的相邻的左侧、右侧、上侧、下侧的像素;The value of the pixel is replaced with a correction value, and the correction value is the value obtained from the difference or the obtained value of all pixels adjacent to the pixel in the binarized image; The pixels are adjacent left, right, upper and lower pixels of the pixel; 在步骤S4和步骤S5之间,所述方法还包括以下步骤:Between step S4 and step S5, the method also includes the following steps: 计算所述滤波后图像的每一行像素中值为1的像素的数量Ni,i∈[1,r],其中r为所述滤波后图像的像素的行数;如果所述滤波后图像的第一行的值为1的像素的数量N1大于0并且小于等于Nj,j∈[2,r-1],则删除所述第一行;如果所述滤波后图像的最后一行的值为1的像素的数量Nr大于0并且小于等于Nj,j∈[2,r-1],则删除所述最后一行;Calculate the number Ni of pixels with a value of 1 in each row of pixels of the filtered image, i∈[1, r], where r is the number of rows of pixels in the filtered image; if the first filtered image The number N1 of pixels with a value of 1 in one line is greater than 0 and less than or equal to Nj, j∈[2, r-1], then delete the first line; if the value of the last line of the filtered image is 1 The number Nr of pixels is greater than 0 and less than or equal to Nj, j∈[2,r-1], then delete the last row; 计算所述滤波后图像的每一列像素中值为1的像素的数量Mk,k∈[1,c],其中c为所述滤波后图像的像素的列数;如果所述滤波后图像的第一列的值为1的像素的数量M1大于0并且小于等于Mn,n∈[2,c-1],则删除所述第一列;如果所述滤波后图像的最后一列的值为1的像素的数量Mc大于0并且小于等于Mn,n∈[2,c-1],则删除所述最后一列;Calculate the number Mk of pixels with a value of 1 in each column of pixels of the filtered image, k∈[1, c], where c is the column number of pixels in the filtered image; if the filtered image's first The number M1 of pixels with a value of 1 in a column is greater than 0 and less than or equal to Mn, n∈[2, c-1], then delete the first column; if the value of the last column of the filtered image is 1 The number of pixels Mc is greater than 0 and less than or equal to Mn, n∈[2,c-1], then delete the last column; 输出裁剪后图像;Output the cropped image; 步骤S5还包括:计算所述裁剪后图像的值为1的像素的数量占所述裁剪后图像的像素的总数量的百分比,以所述百分比作为所述印版的网点面积率。Step S5 further includes: calculating the percentage of the number of pixels with a value of 1 in the cropped image to the total number of pixels in the cropped image, and using the percentage as the dot area ratio of the printing plate. 2.如权利要求1所述的印版的网点面积率的检测方法,其特征在于,所述网点图像为RGB色彩图像,步骤S2包括:2. the detection method of the dot area ratio of printing plate as claimed in claim 1, is characterized in that, described dot image is RGB color image, and step S2 comprises: 根据以下公式对所述网点图像的每一个像素进行灰度化处理,Each pixel of the dot image is grayscaled according to the following formula, f=[0.395×R+0.641×G+0.234×B+0.5],其中,f为所述像素的灰度值,R为所述像素的红色通道的亮度值,G为所述像素的绿色通道的亮度值,B为所述像素的蓝色通道的亮度值。f=[0.395×R+0.641×G+0.234×B+0.5], wherein, f is the gray value of the pixel, R is the brightness value of the red channel of the pixel, and G is the green channel of the pixel is the brightness value of the pixel, and B is the brightness value of the blue channel of the pixel. 3.如权利要求1所述的印版的网点面积率的检测方法,其特征在于,步骤S3包括:3. the detection method of the dot area ratio of printing plate as claimed in claim 1, is characterized in that, step S3 comprises: 采用大津法将所述灰度图像二值化。The grayscale image was binarized by the Otsu method. 4.如权利要求1所述的印版的网点面积率的检测方法,其特征在于,所述表征网点的像素为值为1的像素。4. The detection method of the dot area ratio of the printing plate as claimed in claim 1, wherein the pixel representing the dot is a pixel with a value of 1. 5.一种便携式网点面积率的检测设备,其特征在于,包括一便携壳体、图像采集单元、灰度化处理单元、二值化单元、滤波单元、网点面积率计算单元;5. A detection device for a portable dot area ratio, characterized in that it includes a portable housing, an image acquisition unit, a grayscale processing unit, a binarization unit, a filter unit, and a dot area ratio calculation unit; 所述图像采集单元设置于所述便携壳体上,所述灰度化处理单元、所述二值化单元、所述滤波单元、所述网点面积率计算单元设置于所述便携壳体的内部;The image acquisition unit is arranged on the portable casing, and the grayscale processing unit, the binarization unit, the filtering unit, and the dot area ratio calculation unit are arranged inside the portable casing ; 所述图像采集单元用于采集印版的网点图像;The image acquisition unit is used to acquire the dot image of the printing plate; 所述灰度化处理单元用于对所述网点图像进行灰度化处理,以生成灰度图像;The grayscale processing unit is used to perform grayscale processing on the dot image to generate a grayscale image; 所述二值化单元用于将所述灰度图像二值化,以生成二值化图像;The binarization unit is used to binarize the grayscale image to generate a binarized image; 所述滤波单元用于对所述二值化图像进行滤波,以生成滤波后图像;The filtering unit is used to filter the binarized image to generate a filtered image; 所述网点面积率计算单元用于计算所述滤波后图像中表征网点的像素的数量与所述滤波后图像的像素的总数量的比值,以得到所述印版的网点面积率;The dot area ratio calculation unit is used to calculate the ratio of the number of pixels representing dots in the filtered image to the total number of pixels in the filtered image to obtain the dot area ratio of the printing plate; 所述检测设备还包括裁剪单元,所述裁剪单元设置于所述便携壳体的内部;The detection device also includes a cutting unit, the cutting unit is arranged inside the portable housing; 所述滤波单元还用于以从左至右、从上至下的顺序依次对所述二值化图像的每一个像素进行如下处理:将所述像素的值替换为修正值,所述修正值为所述二值化图像中的所有的与所述像素相邻的像素的值相异或所得的值;与所述像素相邻的像素为所述像素的相邻的左侧、右侧、上侧、下侧的像素;The filtering unit is further configured to perform the following processing on each pixel of the binarized image sequentially from left to right and from top to bottom: replace the value of the pixel with a correction value, and the correction value In the binarized image, the values of all pixels adjacent to the pixel are different or obtained; the pixels adjacent to the pixel are the adjacent left, right, and Pixels on the upper and lower sides; 所述裁剪单元用于计算所述滤波后图像的每一行像素中值为1的像素的数量Ni,i∈[1,r],其中r为所述滤波后图像的像素的行数;如果所述滤波后图像的第一行的值为1的像素的数量N1大于0并且小于等于Nj,j∈[2,r-1],则删除所述第一行;如果所述滤波后图像的最后一行的值为1的像素的数量Nr大于0并且小于等于Nj,j∈[2,r-1],则删除所述最后一行;The cropping unit is used to calculate the number Ni of pixels with a value of 1 in each row of pixels of the filtered image, i∈[1,r], where r is the number of rows of pixels in the filtered image; if The number N1 of pixels whose value is 1 in the first row of the filtered image is greater than 0 and less than or equal to Nj, j∈[2, r-1], then delete the first row; if the last row of the filtered image The number Nr of pixels with a value of 1 in one row is greater than 0 and less than or equal to Nj, j∈[2, r-1], then delete the last row; 所述裁剪单元还用于计算所述滤波后图像的每一列像素中值为1的像素的数量Mk,k∈[1,c],其中c为所述滤波后图像的像素的列数;如果所述滤波后图像的第一列的值为1的像素的数量M1大于0并且小于等于Mn,n∈[2,c-1],则删除所述第一列;如果所述滤波后图像的最后一列的值为1的像素的数量Mc大于0并且小于等于Mn,n∈[2,c-1],则删除所述最后一列;The cropping unit is also used to calculate the number Mk of pixels with a value of 1 in each column of pixels of the filtered image, k ∈ [1, c], where c is the number of columns of pixels in the filtered image; if The number M1 of pixels whose value is 1 in the first column of the filtered image is greater than 0 and less than or equal to Mn, n∈[2,c-1], then delete the first column; if the filtered image The number Mc of pixels whose value is 1 in the last column is greater than 0 and less than or equal to Mn, n∈[2,c-1], then delete the last column; 所述裁剪单元还用于输出裁剪后图像;The cropping unit is also used to output the cropped image; 所述网点面积率计算单元还用于计算所述裁剪后图像的值为1的像素的数量占所述裁剪后图像的像素的总数量的百分比,以所述百分比作为所述印版的网点面积率。The dot area ratio calculation unit is also used to calculate the percentage of the number of pixels whose value is 1 in the cropped image to the total number of pixels in the cropped image, and use the percentage as the dot area of the printing plate Rate. 6.如权利要求5所述的便携式网点面积率的检测设备,其特征在于,所述检测设备还包括显示单元,所述显示单元设置于所述便携壳体的外表面,所述显示单元用于显示所述印版的网点面积率。6. the detection equipment of portable dot area ratio as claimed in claim 5, is characterized in that, described detection equipment also comprises display unit, and described display unit is arranged on the outer surface of described portable housing, and described display unit is used for Displays the dot area ratio of the printing plate. 7.如权利要求5所述的便携式网点面积率的检测设备,其特征在于,所述图像采集单元包括CMOS图像传感器,所述CMOS图像传感器的解析度为500万像素~2500万像素。7. The portable dot area ratio detection device according to claim 5, wherein the image acquisition unit comprises a CMOS image sensor, and the resolution of the CMOS image sensor is 5 million pixels to 25 million pixels. 8.如权利要求5所述的便携式网点面积率的检测设备,其特征在于,所述灰度化处理单元还用于根据以下公式对所述网点图像的每一个像素进行灰度化处理:8. the detection equipment of portable network dot area ratio as claimed in claim 5, is characterized in that, described grayscale processing unit is also used for carrying out grayscale processing to each pixel of described network dot image according to following formula: f=[0.395×R+0.641×G+0.234×B+0.5],其中,f为所述像素的灰度值,R为所述像素的红色通道的亮度值,G为所述像素的绿色通道的亮度值,B为所述像素的蓝色通道的亮度值;f=[0.395×R+0.641×G+0.234×B+0.5], wherein, f is the gray value of the pixel, R is the brightness value of the red channel of the pixel, and G is the green channel of the pixel The brightness value of B is the brightness value of the blue channel of the pixel; 所述二值化单元还用于采用大津法将所述灰度图像二值化。The binarization unit is also used to binarize the grayscale image by Otsu method.
CN201811554335.2A 2018-12-18 2018-12-18 Method and apparatus for detecting dot area ratio of printing plate Active CN109727232B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811554335.2A CN109727232B (en) 2018-12-18 2018-12-18 Method and apparatus for detecting dot area ratio of printing plate

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811554335.2A CN109727232B (en) 2018-12-18 2018-12-18 Method and apparatus for detecting dot area ratio of printing plate

Publications (2)

Publication Number Publication Date
CN109727232A CN109727232A (en) 2019-05-07
CN109727232B true CN109727232B (en) 2023-03-31

Family

ID=66296188

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811554335.2A Active CN109727232B (en) 2018-12-18 2018-12-18 Method and apparatus for detecting dot area ratio of printing plate

Country Status (1)

Country Link
CN (1) CN109727232B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112258501A (en) * 2020-11-10 2021-01-22 深圳拓匠印前科技有限公司 Printing plate mesh point detection method, printing plate measuring instrument and readable storage medium
CN115861297A (en) * 2023-02-14 2023-03-28 联禾印享文化科技(南京)有限公司 Printing plate dot image detection and segmentation method and device based on deep learning

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1805499A (en) * 2005-01-11 2006-07-19 夏普株式会社 Image processing apparatus, image forming apparatus, image reading process apparatus and image processing method
CN102253042A (en) * 2011-04-06 2011-11-23 天津科技大学 Dot area rate detection method of printed product

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3229141B2 (en) * 1994-11-22 2001-11-12 京セラミタ株式会社 Halftone area determination device
US7116447B2 (en) * 2002-05-24 2006-10-03 Eastman Kodak Company Halftone dot-growth technique using a dot edge-detection scheme
JP4362537B2 (en) * 2007-06-06 2009-11-11 シャープ株式会社 Image processing apparatus, image forming apparatus, image transmitting apparatus, image reading apparatus, image processing system, image processing method, image processing program, and recording medium thereof
JP4496239B2 (en) * 2007-07-31 2010-07-07 シャープ株式会社 Image processing method, image processing apparatus, image forming apparatus, image reading apparatus, computer program, and recording medium
EP2112818B1 (en) * 2008-04-22 2015-06-10 Heidelberger Druckmaschinen Aktiengesellschaft Method for reducing the area coverage of a printing plate
CN102183224B (en) * 2011-03-15 2013-03-13 西安理工大学 Method for detecting screen dot of measurement and control strip based on machine vision
CN102878958B (en) * 2012-09-28 2015-09-02 杭州电子科技大学 A kind of measuring method of lithographic forme dot area
CN103837537B (en) * 2014-03-17 2016-05-25 武汉大学 A kind of without Grains metal inkjet forme dot area percentage measuring method
CN104616245B (en) * 2015-02-09 2017-09-22 西安理工大学 Optimize the method for dot parameters in a kind of dot shape anti-counterfeiting technology
CN104742516B (en) * 2015-03-12 2017-01-25 周广伟 High-power image dot coverage rate digital measuring method suitable for whole printing process

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1805499A (en) * 2005-01-11 2006-07-19 夏普株式会社 Image processing apparatus, image forming apparatus, image reading process apparatus and image processing method
CN102253042A (en) * 2011-04-06 2011-11-23 天津科技大学 Dot area rate detection method of printed product

Also Published As

Publication number Publication date
CN109727232A (en) 2019-05-07

Similar Documents

Publication Publication Date Title
WO2022088620A1 (en) State detection method and apparatus for camera lens, device and storage medium
EP3783374A1 (en) Method for detecting corona discharge employing image processing
CN110599552B (en) pH test paper detection method based on computer vision
CN103366170B (en) Image binaryzation processing unit and its method
CN105488758B (en) A kind of image-scaling method based on perception of content
CN104574419B (en) Lens distortion parameter calibration method and system
CN104504722B (en) Method for correcting image colors through gray points
CN112801947A (en) Visual detection method for dead pixel of LED display terminal
CN105160682B (en) Method for detecting image edge and device
CN105005969B (en) A kind of bill images alter detection method and system
CN107358627A (en) Fruit size detection method based on Kinect cameras
CN106651797B (en) Method and device for determining effective area of signal lamp
CN109727232B (en) Method and apparatus for detecting dot area ratio of printing plate
CN108182682A (en) A kind of detection method based on Computer Image Processing and pattern-recognition
CN101315664A (en) Text Image Preprocessing Method for Text Recognition
WO2017128646A1 (en) Image processing method and device
CN104380713A (en) Dead point correction method and system for digital image
CN109949308A (en) A Fast Extraction Method of Space Relative Navigation Targets Against Starlight Interference
CN110114801B (en) Image foreground detection device and method and electronic equipment
CN109724776A (en) A kind of determination method and device of the grid section damaged condition of sintering pallet
CN115984356A (en) Image-based wire crimping distance measuring method and system
US9098895B2 (en) Image processing method and device
CN100508556C (en) A digital image grid noise detection and elimination device and method
CN105279742B (en) A kind of image de-noising method quickly based on piecemeal estimation of noise energy
CN112634179B (en) Camera shake prevention power transformation equipment image change detection method and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant