# An Algorithm for Obtaining 3D Egg Models from Visual Images
## 3 Material and Methods  
Basic egg shapes were used as well as color digital images of eggs from sparrow (_Passer domesticus_ L.), mallard (_Anas platyrhynchos_ L.), and quail (_Coturnix_\(\acute{\text{c}}\)_turnix_ L.) grown free (semi-wild). The eggs were collected in the region of Yambol, Bulgaria. Images of the eggs were obtained with a Digimax D250 digital camera (Samsung Electronics Co., Ltd., Samsung Digital City, Samsungno 129, Maetan-dong, Yeongtong District, Suwon, Korea), serial number 34603308. The images used were 640 \(\times\) 480 pix resolution. The size adjustment was made with a digital caliper, with an accuracy of 0.02 mm.  
The following abbreviations were used:  
\(D\), \(D1\)--long axis of the egg;  
\(d\), \(d1\)--short axis of the egg;  
MC--mass center of the egg;  
\(h_{1}\)--length of the obtuse end of the egg;  
\(h_{2}\)--length of the acute part of the egg;  
\(\alpha\)--angle at the acute end of the egg;  
\(\beta\)--angle at the obtuse end of the egg;  
\(f\)--segment between mass center of the egg and intersection of its major and minor axes;\(\alpha\) = 0.05--level of significance;  
\(p\)-value;  
\(g\) and \(h\)--lengths of sections;  
\(c\)--correction factor;  
\(R^{2}\)--coefficient of determination;  
X, X1--parameters used for determination of coordinates needed for calculation of \(h_{1}\) and \(h_{2}\); SE--standard error.  
2D--two-dimensional;  
3D--three-dimensional.  
The improvement of classic schemes in recognition of image form is proposed by [PERSON] et al. [13]. In this work, the scheme was used for determining the morphological characteristics of eggs proposed by [PERSON] et al. [24]. The scheme has been used with some modifications related to its application in conjunction with the proposed 3D egg models. Figure 1 shows a diagram for obtaining basic morphological characteristics of eggs. \(D\), mm denotes the long axis of the egg; \(d\), mm is the short axis of the egg; MC is a mass center; \(h_{1}\), mm is the length of the obtuse end of the egg; \(h_{2}\), mm is the length of the acute part of the egg; \(\alpha\) is the angle at the acute end of the egg; \(\beta\) is the angle at the obtuse end of the egg.  
The angles in the obtuse and acute edges of the egg are determined by the following formulas:  
\[\alpha=2\cdotatan\frac{d}{h_{2}} \tag{1}\]  
\[\beta=2\cdotatan\frac{d}{h_{1}} \tag{2}\]  
The two-dimensional contour of an egg can be described by equations in a Cartesian coordinate system. A two-dimensional egg contour is used from [PERSON] [25], which is modification of the model, proposed by [PERSON] et al. [26]. In the present work, it is adapted to the 3D model:  
\[y=d\cdot cos\varphi z=(D+c\cdot cos\varphi)sin\varphi \tag{3}\]  
where \(d\), mm is the short axis of the egg; \(D\), mm is the long axis of the egg; correction factor \(c\) = 0--1; angle \(\varphi\leq|\pi|\).  
Figure 1: Egg contour and defined parameters.  
To determine the mass center, large and small axis of eggs in their digital images, the \"regionprops\" function in the Matlab programming environment (The mathworks Inc., Natick, MA, USA) was used. The algorithm proposed in this work is implemented in this program.  
All data were processed at a level of significance \(\alpha=0.05\).