Current Issue Cover
蚕茧表面图像等效阶梯柱面展开

孙卫红1, 廖艺真1, 梁曼1, 邵铁锋1, 毕海忠2(1.中国计量大学机电工程学院, 杭州 310018;2.中国纤维质量监测中心, 北京 100007)

摘 要
目的 在机器视觉的蚕茧分选研究中,完整的表面图像有利于提高蚕茧的识别准确度。由于蚕茧的形状呈长椭圆形,其在成像面上的投影存在信息压缩,需对其图像展开后才能进行拼接,因此提出了一种基于等效阶梯柱面模型的蚕茧表面图像展开方法。方法 对采集到的蚕茧图像预处理后进行椭圆拟合,根据拟合结果建立蚕茧的数学模型,基于微积分化曲为直的思想,将蚕茧模型转化为等效阶梯柱面模型,建立相应的坐标系,推导出阶梯柱面模型展开图与原图的像素坐标映射关系,进而实现蚕茧表面图像的展开。结果 对比本文方法与采用蚕茧最大半径值的柱面展开方法对阶梯柱面模型表面图像的展开结果,评价两种展开方法方格左上角的坐标值与理论值之间的平均绝对误差,本文方法为1.66像素,对比方法为3.06像素。说明本文方法得到的坐标值与理论值的拟合程度更高,绝对误差范围和平均误差值更小。此外,对展开的蚕茧表面图像进行重复部分拼接实验,拼接后图像重叠处及重叠区域边缘的蚕茧表面纹理连续性保持良好。结论 等效阶梯柱面展开方法可以有效的实现蚕茧表面图像展开,还原其表面原始信息,为后续蚕茧表面图像完整拼接提供良好的技术支撑。
关键词
Equivalent step cylinder unfolding of silkworm cocoon surface image

Sun Weihong1, Liao Yizhen1, Liang Man1, Shao Tiefeng1, Bi Haizhong2(1.College of Mechanical and Electrical Engineering, China Jiliang University, Hangzhou 310018, China;2.National Cocoon and Silk Product Quality Supervision and Inspection Center, Beijing 100007, China)

Abstract
Objective Stitching two different angles of silkworm surface images directly is not feasible even with several overlapping areas between them because the shape of a silkworm cocoon is long and elliptical and some information is compressed in its projection on the imaging surface. However, most of the existing image unfolding methods are aimed at cylinders with uniform radius, which is ineffective in the application of cocoon image unfolding. In this study, the surface image unfolding method of silkworm cocoon based on the equivalent step cylindrical model of a silkworm cocoon is proposed according to the shape characteristics of silkworm cocoon. Method To obtain the surface image of the silkworm cocoon, we designed a set of image acquisition devices, driving the cocoon rotation through the synchronous rotation of two rollers, thereby enabling the camera to conveniently collect the complete image of the silkworm cocoon surface. We assume that the mathematical model of the silkworm cocoons is a rotational ellipsoid, and the image is subjected to gray scale, filter, binarization, and edge extraction successively. Thereafter, the extracted edges are fitted to obtain the ideal mathematical model of the cocoon in the image. A cylinder can be unfolded along one side to a rectangle, where the ideal silkworm cocoon model is divided into n segments along the rotational axis according to the calculus. The height of each segment is Δh.Given that Δh is small, the curve can be regarded as a straight line, so a small segment of the ellipse can be equal to a cylinder, and the cocoon model becomes a super position of a series of cylindrical models. Therefore, an equivalent stepped cylinder model of the cocoon model is obtained. The diameter of each small segment of the cylinder is calculated by the diameters of the upper and lower surfaces of the ellipsoidal segment replaced by the cylinder. As the diameter of the silkworm cocoon is extremely small (18 mm), the error brought by the camera aperture imaging model can be ignored, and the camera catches the parallel projection image of the silkworm cocoon. We set a coordinate system of OW to XWYWZW as the world coordinate system, o to xy as the original imaging plane, and o to uv as the unfolding plane. Based on the world coordinate system, the pixel coordinate mapping relationship between the unfolding plane of the stepped cylinder model and original image is derived. Reverse mapping is performed by a linear interpolation algorithm, and each pixel in the unfolded image is traversed. The surface unfolding image of the silkworm cocoon is obtained based on the equivalent step cylindrical model with the corresponding pixel values extracted from the original image using the given mapping relationship. Result The experiment was conducted by the 3D-printed step cylindrical model and the cocoon. In example 1, the surface of the step cylindrical model of 3D printing was pasted with a small black-and-white checker board with a size of 1 mm×1 mm. After the images were acquired, the stepped cylinder image was unfolded using the unfolding method and the cylinder unfolding method with the maximum radius value of the cocoon as the unfolding value. Given that the squares of the checkerboard used in the experiment had the same size, in the ideal state, the size of each square in the unfolded image should be the same. Therefore, based on the coordinates and size of the white grid in the center of the image, the theoretical value of the corner points of all the squares in the ideal unfolded image can be calculated. The unfolding effect is compared by the difference between the coordinate values of the upper left corners of the two unfolding methods and the theoretical values. Results show that the coordinate values obtained by the equivalent step-cylinder surface unfolding method are more than a match for the theoretical value compared with the equal-diameter unfolding method with maximum radius value, and the average relative error is much smaller. In example 2, the equivalent step-cylinder surface unfolding method is tested by a common silkworm cocoon image. When the cocoon image is obtained and preprocessed according to the elliptical circumscribing rectangle, the image is obtained by the ellipse fitting to extract the region of interest, so that the long axis of the ellipse remains vertical and the excess background is removed. The roller control motor of the image acquisition device starts. When the silkworm cocoons rotate a certain angle, the camera obtains another angle of cocoon image with overlapping area with the previous image, and the same preprocessing step on the image is performed to obtain the ROI area of the silkworm cocoon. The two images are unfolded by the unfolding method proposed in this paper. By manually splicing the two unfolded images and observing the silkworm cocoon texture of the overlap of the stitched image and the edge of the overlap region, we can find that the texture continuity of the silkworm cocoon is better and the unfolded image has an improved stitching effect. Conclusion Results show that the step cylinder unfolding method proposed in this paper has a better unfolding effect than the unfolding method with a single radius value, which can provide a good environmental basis for the mosaic subsequent research on silkworm cocoon surface images. In addition, the method can be applied to the unfolding of other ellipsoidal surface images.
Keywords

订阅号|日报