Equivalent step cylinder unfolding of silkworm cocoon surface image

Sun Weihong,Liao Yizhen,Liang man,Shao tiefeng,Bi haizhong()

Abstract
Objective: It is unfeasible to stitch two different angles of silkworm surface images directly even through there are some overlapping areas between them, because the shape of silkworm cocoon is long elliptic and some information is compressed in its projection on the imaging surface. However, most of the existing image unfolding methods are aimed at cylinder with uniform radius, which is not effective in the application of cocoon image unfolding. In this paper, the surface image unfolding method of silkworm cocoon based on the equivalent step cylindrical model of silkworm cocoon is proposed according to the shape characteristics of silkworm cocoon. Methods: In order to obtain the surface image of silkworm cocoon, a set of image acquisition device is designed, in which drives the cocoon rotation through the synchronous rotation of two rollers, which makes it convenient for the camera to collect the complete image of silkworm cocoon surface. Assume that the mathematical model of the silkworm cocoons is an ellipsoid of rotation, and the image is deal with gray scale, filter, binarization and edge extraction successively. After that, the extracted edges were an ellipse fitted to obtain the ideal mathematical model of the cocoon in the image. As known, a cylinder can be unfolded along one side to a rectangle, based on it, the ideal silkworm cocoon model is divided into n segments along the rotational axis according to the calculus. The height of each segment is . As is so small that 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 superposition 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. Since the diameter of the silkworm cocoon is so small (18mm) that the error brought by the camera aperture imaging model can be ignored, and the camera catches the parallel projection image of the silkworm cocoon. Set a coordinate system of as the world coordinates system, as the original imaging plane, 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 the original image is derived. The reverse mapping is performed by a linear interpolation algorithm, and each pixel in the unfolded image is traversed. Meanwhile, with the corresponding pixel values extracted from the original image by using the above mapping relationship, we can obtain a surface unfolding image of the silkworm cocoon based on the equivalent step cylindrical model. Results: The experiment was carried out by the 3D printed step cylindrical model and the cocoon. In the example 1, the surface of the step cylindrical model of 3D printing is pasted with a small black and white checkerboard which with a size of 1mm×1mm. After the images were acquired, the stepped cylinder image was unfolded using the unfolding method of this paper and the cylinder unfolding method with the maximum radius value of the cocoon as the unfolding value. Since the squares of the checkerboard used in the experiment has 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. Result shows that the coordinate values obtained by the equivalent step cylinder surface unfolding method are more than a match for the theoretical value compared to the equal-diameter unfolding method with the 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 got 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. Then, 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 pre-processing 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. Manually splicing the two unfolded images, and then observing the silkworm cocoon texture of the overlap of the stitched image and the edge of the overlap region, it can be found that the texture continuity of the silkworm cocoon is better, and it is proved that the unfolded image has a better stitching effect. Conclusion: Result shows 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 of silkworm cocoon surface images. In addition, the method can also be applied in the unfolding of other ellipsoidal surface images.
Keywords
QQ在线