Next Article in Journal
Online Signature Verification Systems on a Low-Cost FPGA
Previous Article in Journal
Development of an Autonomous Driving Smart Wheelchair for the Physically Weak
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Communication

An Algorithm for Obtaining 3D Egg Models from Visual Images

by
Zlatin Zlatev
1,*,
Mariya Georgieva-Nikolova
1 and
Hristo Lukanov
2
1
Faculty of Technics and Technologies, Trakia University, 38 Graf Ignatiev Street, 8602 Yambol, Bulgaria
2
Sub-Department Poultry Farming, Department of Animal Husbandry–Non-Ruminants and Other Animals, Agrarian Faculty, Trakia University, 6000 Stara Zagora, Bulgaria
*
Author to whom correspondence should be addressed.
Appl. Sci. 2022, 12(1), 373; https://doi.org/10.3390/app12010373
Submission received: 30 November 2021 / Revised: 19 December 2021 / Accepted: 30 December 2021 / Published: 31 December 2021
(This article belongs to the Topic Applied Computer Vision and Pattern Recognition)

Abstract

:
Mathematical models for describing the shape of eggs find application in various fields of practice. The article proposes a method and tools for a detailed study of the shape and peripheral contours of digital images of eggs that are suitable for grouping and sorting. A scheme has been adapted to determine the morphological characteristics of eggs, on the basis of which an algorithm has been created for obtaining their 3D models, based on data from color digital images. The deviation from the dimensions of the major and minor axes measured with a caliper and the proposed algorithm is 0.5–1.5 mm. A model of a correction factor has been established by which the three-dimensional shape of eggs can be determined with sufficient accuracy. The results obtained in this work improve the assumption that the use of algorithms to determine the shape of eggs strongly depends on those of the bird species studied. It is approved with data for Mallard eggs which have a more elliptical shape and correspondingly lower values of correction coefficient ‘c’ (c = 1.55–4.96). In sparrow (c = 9.55–11.19) and quail (c = 11.71–13.11) eggs, the form tends to be ovoid. After testing the obtained model for eggs from three bird species, sparrow, mallard, and quail, the coefficient of the determination of proposed model was R2 = 0.96. The standard error was SE = 0.08. All of the results show a p-value of the model less than α = 0.05. The proposed algorithm was applied to create 3D egg shapes that were not used in the previous calculations. The resulting error was up to 9%. This shows that in the test, the algorithm had an accuracy of 91%. An advantage of the algorithm proposed here is that the human operator does not need to select points in the image, as is the case with some of the algorithms developed by other authors. The proposed methods and tools for three-dimensional transformation of egg images would be applicable not only for the needs of poultry farming, but also in ornithological research when working with different shaped varieties of eggs. Experimental results show that the proposed algorithm has sufficient accuracy.

Graphical Abstract

1. Introduction

The application of mathematical models for describing the shape of eggs is in both poultry and ornithology, as well as in industrial technology, mathematics, art, architecture, religion, and philosophy. Examples are egg-shaped sludge mills; egg-shaped water channels; compartments of cars with ovate shape; egg-shaped cell phones; and speakers; refrigerators and washing machines of this form have been developed. The mathematical models of eggs are applied to the design of buildings, the elements of infrastructure that have high energy efficiency, high aerodynamic qualities, and minimal material consumption [1,2].
Determining the geometric dimensions of eggs and their relationship is important for poultry and ornithology studies. The results obtained can be used in population analysis, environmental morphology, predicting the weight of chickens, and assessing the quality characteristics of eggs. Size of the egg is related to important aspects in the study of bird behavior, such as the mass of the female, the social status of the female, the place and time of laying, the physicochemical composition of the egg, nesting, the size of the nest, and the breeding of birds.
The following major trends are observed in the creation and analysis of egg models:
Models based on known egg shapes without making comparisons with real eggs [3];
Egg models and their validation with those of a small number of bird species [4];
Models validated by a large number of bird species [5].
Egg models have been developed both in two-dimensional [6,7] and in three-dimensional form [8].
Current research relating to model definition and classification of eggs has focused on the use of simplified analysis procedures. Studies and analyses are directed to the use of contactless measurement methods, including systems for image acquisition, processing and analysis, spectral, and dielectric characteristics. The mathematical description of the shape of the eggs is applied to these methods.
Techniques for automating the inspection of products in various fields of application have been proposed by researchers in recent years. Research in this area is focused on the use of systems for obtaining, processing, and analyzing color digital images.
One of the main applications of digital image processing is to determine the number and type of objects in them. The variety of objects creates many problems in this process as each object has its own characteristics and features. Difficulties in solving this task arise from various factors such as the contrast between objects and the background, the degree of separability and grouping of objects, their texture and variety, and size. These features are evident in organic products such as eggs, as they are too complex and the images obtained from them include all the listed factors.
The purpose of the article is to propose a method and tool for detailed examination of the shape and peripheral contours of digital images of eggs that are suitable for grouping and sorting.
The contributions in this paper include: image processing and analysis techniques are valuable for analysis of the external characteristics of eggs. A method of geometrical transformation of an egg contour into a three-dimensional surface was examined. Two-dimensional image processing and analysis techniques were applied for obtaining a 3D model of egg shapes. The proposed algorithm showed appropriate accuracy and low error rates.

2. Related Works

Eggs have the shape of an irregular ellipse. This can be determined visually, but the assessment in these cases is too subjective [9]. According to Narushin et al. [10], the judicious assessment of the shape of the eggs can be used only in cases where the requirements for the accuracy of the assessment are not very high. A more accurate idea of the shape can be obtained by measuring the diameters of the egg and calculating the index of the shape as a percentage between the small and large diameters of the egg [11,12].
Optimal hen eggs have an index of 73–75%, and this trait varies both depending on the age of the laying hens and depending on the genotype (breed or hybrid affiliation). The lower the value of the shape index, the longer the shape of the egg, and vice versa—high values indicate an oval shape [13].
According to Panda and Singh [14], the quail egg shape index is in the range of 78–79%, while Polat et al. [15] report slightly lower values (75%). According to the authors, the average sizes of quail eggs are 34.9 mm large and 26.2 mm smaller in diameter. Sezer [16] found a positive relationship between the shape index and the mass of eggs, and according to the author, the determination of mass is more strongly influenced by the small diameter of the egg. The shape of the egg affects the resistance of the egg to breakage. Richards and Swanson [17] found that the shape index explains 15 to 35% of shell breakage cases. According to Bain [18], a more rounded shape is more desirable because it makes the egg more resistant to manipulation without compromising the integrity of the eggshell. This conclusion is supported by later studies by Altuntas and Sekeroglu [19]. By analyzing the shape and its main characteristics, it is possible to create patterns of the shape of some elements of the eggs, for which it is possible to create patterns in which there is a certain stylization of the shape.
The main indicators of the shape of eggs by which classification is made are asymmetry, elongation, and pointedness [20], large and small axis [21], as for the division of eggs, eggs of different bird species, and to take into account the factors that influence the formation of the egg fossa. Although for the presentation of these shape indices by transformation of the feature space by the Principal Component Analysis (PCA) method [22], egg separation is not sufficiently accurate and a strong overlap is observed between data on different bird species.
The disadvantage of the methods used so far is that only the external shape of eggs is taken into account, without taking into account their internal characteristics [23], which depend on factors such as bird habitat, feeding, and age.
From the first definition of the problem with Preston [6], at the current level of science and technology, the problem of describing the shape of eggs still remains partially solved. The proposed solutions are both at the technological level, for example Duursma et al. [21], as well as with modern software and hardware tools, as indicated in the review article by Nyalala et al. [12]. According to the descriptions in the introduction and related works sections of this paper, the shape is the main physical indicator for identifying a large part of the elements of the eggs, during their incubation, packaging, sorting, and transportation. Such studies are also important for ornithology, where analyses of the change in egg shape depending on the bird’s habitat are performed. It is mentioned in the technological research, but also in the technical papers in the available literature cited.
Using techniques of computer graphics and image analysis, dielectric and ultrasonic characteristics, and spectral and hyperspectral analysis, it is possible to determine freshness, irregular shape, mechanical damage, internal and external defects, bird status, ecology, and sorting and grouping of eggs. The issue of the practical application of the developed models and methods for egg analysis remains insufficiently clear.
Therefore, the present study focuses on the development and research of effective approaches, including descriptions, models, and tools for the recognition of egg elements, in terms of their shape. In this paper, a study was carried out on methods and algorithms used for the geometric transformation of the contour of real eggs of different bird species, based on 3D transformation based on the digital image data. This approach has been shown to be suitable for further research to develop appropriate technical tools that can be used for research in the field of analysis of the external characteristics of eggs.

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 coturnix 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 × 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;
h1—length of the obtuse end of the egg;
h2—length of the acute part of the egg;
α—angle at the acute end of the egg;
β—angle at the obtuse end of the egg;
f—segment between mass center of the egg and intersection of its major and minor axes;
α = 0.05—level of significance;
p-value;
g and h—lengths of sections;
c—correction factor;
R2—coefficient of determination;
X, X1—parameters used for determination of coordinates needed for calculation of h1 and h2;
SE—standard error.
2D—two-dimensional;
3D—three-dimensional.
The improvement of classic schemes in recognition of image form is proposed by Narushin et al. [13]. In this work, the scheme was used for determining the morphological characteristics of eggs proposed by Genchev 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; h1, mm is the length of the obtuse end of the egg; h2, mm is the length of the acute part of the egg; α is the angle at the acute end of the egg; β 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:
α = 2   ·   a t a n d h 2
β = 2   ·   a t a n d h 1
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 Yamamoto [25], which is modification of the model, proposed by Todd et al. [26]. In the present work, it is adapted to the 3D model:
y = d   ·   c o s φ z = ( D + c   ·   c o s φ ) s i n φ
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 φ ≤ |π|.
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 α = 0.05.

4. Results and Discussion

The change in the basic scheme for determining the morphological characteristics of eggs is related to the use of the mass center of the egg as a starting point for further calculations. The intersection of the long and short axis of the egg does not coincide with its mass center in all cases. This modification is necessitated by the fact that in computer programs for object analysis in images, there are ready-to-use functions for finding the long axis, short axis, and mass center of the object. The adapted 3D model of an egg is:
x = D   ·   c o s φ   ·   s i n θ         c = 1 22 y = d   ·   c o s θ       0 θ π z = ( d + c   ·   c o s θ )   ·   s i n θ   ·   s i n φ       0 φ 2 π
where d, mm is the short axis of the egg; D, mm—long axis of the egg; c—correction factor determining the shape of the egg.
Figure 2 shows a diagram for obtaining a 3D model of an egg. Two sections were added X-Z and Y-Z, with description of the egg dimensions used in the developed algorithm.
The lengths of sections ‘g’ and ‘h’ are determined relative to the mass center of the egg. The segment ‘g’ has a length equal to the distance between the center of mass and the minimum value along the y axis—the point Y2. In the same way, segment ‘h’ has a length equal to the distance between the center of mass and the maximum value along the y axis—the point Y1. The length of section ‘f’, between the center of mass MC and the intersection of the long and short axes of the egg, is determined. The segment ‘e’ is the distance between the center of mass MC and the maximum value along the Z axis—the point Z1 of the egg. According to Pythagoras’ theorem, the segment ‘f’ has a length:
f = e 2 ( d 2 ) 2
After determining the lengths of the segments, those of the acute and obtuse end of the egg are determined as:
h 1 = g f h 2 = h + f
After preliminary analyses, it was found that the correction factor ‘c’ in the adapted three-dimensional model has a linear relationship with the ratio between the angles of the egg in the obtuse and its acute end c = f ( β / α ) . The resulting model, describing with sufficient accuracy this relationship, is of the form:
c = 159.69 β α 157.4 ;   R 2 = 0.96
Using the model to describe the three-dimensional shape of eggs in their basic forms Mytiai et al. [27], the correction coefficient assumes values of c = 1–22.
The developed algorithm for obtaining three-dimensional egg models from color digital images is linear. Table 1 shows the steps of the algorithm in descriptive form and in pseudocode. The loaded image has been converted to RGB by HSV. The S(HSV) color component was used. After removing the openings and filtering, the coordinates of the egg center, large and small axis, were obtained with the regionprops function. H1, h2 were determined and the angles at the acute and obtuse ends of the egg α, β were calculated. Based on the model obtained, the correction factor ‘c’ was calculated. D1, d1 are the long and short axes of the egg, X, X1 are used for determination of coordinates needed for calculation of h1 and h2. The coordinates of the 3D model of the egg were determined and it was rendered.
As a result of the visualization (Figure 3), the influence of coefficient ‘c’ on the surface formation of egg models was established. The low values of this coefficient result in an elliptical and oval shape. As the values of this coefficient increase, the ovoid shape of the obtained three-dimensional objects is observed. It can be assumed that for different species of birds, it would be more appropriate to apply a model for spherical eggs and those with a more rounded shape. Moreover, the ovoid model would be appropriate if the eggs examined are more conical.
Figure 4 shows the images of eggs from three bird species and their 3D forms. The filled contour of the egg obtained by an image processing algorithm and the contour described by a model is visualized. The small axis, large axis, perimeter, and area of the egg were determined. The deviation from the dimensions of the major and minor axes measured with a caliper and the proposed algorithm was 0.5–1.5 mm.
Figure 5 shows the basic forms of eggs and those of sparrow, mallard, quail. The data presented are for the function c = f ( β / α ) . It can be seen that the coefficient ‘c’ can be used to distinguish eggs from the three species of birds tested. Clearly distinguished are eggs from Mallard, which have a tendency to be elepsoid. Sparrow and quail eggs are close in value ( β / α ) , but differ by a factor of ‘c’. When analyzing the residuals, there is a lack of systematic deviation of the actual data from the theoretical data, which is a sign of their normal distribution. Residuals analysis shows that the model is adequate. The analysis of the standardized coefficients shows that the relationship between angles α and β influence in predicting the ‘c’ coefficient. The coefficient of the determination of the proposed model is R2 = 0.96. The standard error is SE = 0.08. All of the results show p-value of the model, less than α = 0.05. It can be considered that the prerequisites of the regression analysis are fulfilled.
The proposed algorithm was applied to create 3D egg shapes that were not used in the previous calculations. The resulting error was up to 9%. This shows that in the test, the algorithm had an accuracy of 91%.
The results obtained in this paper improve the assumption of Narushin et al. [10] that the use of algorithms to determine the shape of eggs strongly depends on those of the bird species studied. Mallard eggs have a more elliptical shape and correspondingly lower values of coefficient ‘c’ (c = 1.55–4.96). In sparrow eggs (c = 9.55–11.19) and quail (c = 11.71–13.11), the form tends to ovoid.
In the present work it is proven that the proposed methods and algorithm for 3D geometric transformations of color digital images of eggs is suitable for application in technical systems, because the accuracy is above 90%.
It can be assumed that for different bird species, the correction factor ‘c’ may not correspond to the values indicated in this paper. This may be due to defects in the shell of the egg, abnormal shape, or immature eggs.
An advantage of the algorithm proposed here is that the human operator does not need to select points in the image, as is the case with some of the algorithms developed so far [4,7].
The problem with the orientation of the egg in the image remains unresolved. This problem was pointed out by Biggins et al. [20]. According to the authors, the egg should be horizontal when its image is received, as otherwise the size and shape of the created three-dimensional model will be compromised. This was also proven by Titova et al. and Alikhanov et al. [11,28].
In the present work, it was found that the deviation from the horizontal axis of the egg in the image ±10% leads to an error in determining the parameters of the eggs up to 5%. Further analysis is needed about the working speed of the proposed algorithm and the possibilities for its direct implementation in real recognition systems. In addition, the work can be continued with comparison of the results with public available datasets, as mention in Manzo et al. [29].

5. Conclusions

Methods and tools for analyzing and evaluating bird eggs have been developed based on the analysis of the digital image format of their elements, which create three-dimensional models and descriptions of the shape of the egg elements corresponding to their basic shapes. Approaches have been adapted to recognize the basic elements of eggs by their color digital images based on extracted features that create three-dimensional models of eggs.
A method for the formation of three-dimensional models of egg elements is proposed, which describes the nature of the change in the surface of the elements by taking into account the relative lengths and growths of intersecting lines perpendicular to the symmeters and evenly distributed along their length. Based on the descriptions thus obtained, three-dimensional egg-shaped models corresponding to their basic shapes have been defined.
Methods and tools for recognizing eggs based on morphological features and the shape of their elements have been developed, represented by three-dimensional descriptions of the surface, based on the basic geometric parameters of the elements and a set of ratios between them.
A comparative study was performed to evaluate the effect of the methods used to represent the surface of eggs on recognition accuracy. The use of the method for describing the three-dimensional shape of eggs by geometric and morphological characteristics has been found.
Software tools have been developed to implement the proposed digital image analysis methods and procedures, with the purpose of constructing descriptions of the three-dimensional shape of eggs, their classification into major groups based on their shape, and the classification accuracy for recognizing different egg species.
The values of the correction factor ‘c’ have been determined by which the basic three-dimensional shapes of the eggs can be described with sufficient accuracy. The advantage of the algorithms and procedures proposed here over the existing ones is that all the basic parameters involved in the calculations are automatically determined.
The deviation from the horizontal axis of the egg in the image ±10% has been found to produce an error in determining the egg parameters up to 5%.
The egg shapes studied were for sparrow, mallard, and wild quails. This is because they are the most studied in Bulgaria. For the future work, a study including species with more extreme egg shapes is needed.
The proposed functional solution of the algorithm allows modification of the recognition procedure and its use in the creation of methods and tools for analysis of basic external characteristics, as well as technical equipment for collecting, cleaning, sorting, packaging, transport, and storage of eggs, for both wild birds and domestic poultry.
The proposed methods and tools for three-dimensional transformation of egg images would be applicable not only for the needs of poultry farming, but also in ornithological research when working with different-shaped varieties of eggs. Experimental results show that the proposed algorithm has sufficient accuracy.
In our work, a comparative analysis of the effectiveness of the algorithm for obtaining 3D egg shapes was proposed, in terms of its error rates. Additional research is needed in the operation of the selected algorithm in its operation on single-board microcomputers, for example, Arduino or Raspberry Pi. Such an analysis would show the working speed of this algorithm and the possibilities for its direct implementation in real recognition systems, applicable directly to portable devices or sorting machines.

Author Contributions

Conceptualization, Z.Z. and H.L.; methodology, H.L.; software, Z.Z. and M.G.-N.; validation, H.L.; formal analysis, Z.Z.; investigation, Z.Z., H.L. and M.G.-N.; resources, Z.Z.; data curation, H.L.; writing—original draft preparation, Z.Z. and M.G.-N.; writing—review and editing, Z.Z. and H.L.; visualization, Z.Z.; supervision, H.L. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable (The products are from Trakia University, Bulgaria and its laboratories, Collected from the region of Yambol, Bulgaria).

Informed Consent Statement

Not applicable.

Data Availability Statement

Data will be made available on request.

Conflicts of Interest

The authors declare no conflict of interest.

References

  1. Petrović, M.; Obradović, M.; Mijailović, R. Suitability Analysis of Hugelschaffer’s Egg Curve Application in Architectural Structures’ Geometry; Buletinul Institutului Politehnic din Iaşi, Publicat de Universitatea Tehnică, Gheorghe Asachi” din Iaşi, Tomul LVII (LXI), Fasc. 3; English translation: Bulletin of the Polytechnic Institute of Iasi; Technical University “Gheorghe Asachi”: Iasi, Romania, 2011; pp. 115–122. [Google Scholar]
  2. Regueiro-Picallo, M.; Naves, J.; Anta, J.; Puertas, J.; Suárez, J. Experimental and Numerical Analysis of Egg-Shaped Sewer Pipes Flow Performance. Water 2016, 8, 587. [Google Scholar] [CrossRef] [Green Version]
  3. Maulana, A.; Yunus, M.; Sulistyaningrum, D. The constructions of egg-shaped surface equations using Hugelschaffer’s egg-shaped curve. Indones. J. Phys. 2015, 26, 26–30. [Google Scholar]
  4. Attard, M.R.; Sherratt, E.; McDonald, P.; Young, I.; Vidal-García, M.; Wroe, S. A new, three-dimensional geometric morphometric approach to assess egg shape. PeerJ 2018, 6, e5052. [Google Scholar] [CrossRef] [PubMed]
  5. Stoddard, M.C.; Yong, E.H.; Akkaynak, D.; Sheard, C.; Tobias, J.A.; Mahadevan, L. Avian egg shape: Form, function, and evolution. Science 2017, 356, 1249–1254. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  6. Preston, F.W. The Shapes of Birds’ Eggs. Auk 1953, 70, 160–182. [Google Scholar] [CrossRef]
  7. Troscianko, J. A simple tool for calculating egg shape, volume and surface area from digital images. Ibis 2014, 156, 874–878. [Google Scholar] [CrossRef]
  8. Yang, C.; Liang, W.; Møller, A.P. Using 3D modelling and printing to study avian cognition from different geometric dimensions. R. Soc. Open Sci. 2019, 6, 181938. [Google Scholar] [CrossRef] [PubMed] [Green Version]
  9. Stefanov, E.; Georgieva, T.; Daskalov, P. Review of methods for eggshell defects detection and quality grading. Proc. Univ. Ruse 2020, 59, 70–74. [Google Scholar]
  10. Narushin, V.G.; Lu, G.; Cugley, J.; Romanov, M.N.; Griffin, D.K. A 2-D imaging-assisted geometrical transformation method for non-destructive evaluation of the volume and surface area of avian eggs. Food Control. 2020, 112, 107112. [Google Scholar] [CrossRef]
  11. Alikhanov, J.; Penchev, S.M.; Georgieva, T.D.; Moldazhanov, A.; Shynybay, Z.; Daskalov, P. An indirect approach for egg weight sorting using image processing. J. Food Meas. Charact. 2017, 12, 87–93. [Google Scholar] [CrossRef]
  12. Nyalala, I.; Okinda, C.; Kunjie, C.; Korohou, T.; Nyalala, L.; Chao, Q. Weight and volume estimation of poultry and products based on computer vision systems: A review. Poult. Sci. 2021, 100, 101072. [Google Scholar] [CrossRef] [PubMed]
  13. Narushin, V.G.; Romanov, M.N.; Lu, G.; Cugley, J.; Griffin, D.K. How oviform is the chicken egg? New mathematical insight into the old oomorphological problem. Food Control. 2021, 119, 107484. [Google Scholar] [CrossRef]
  14. Panda, B.; Singh, R. Developments in processing quail meat and eggs. World’s Poult. Sci. J. 1990, 46, 219–234. [Google Scholar] [CrossRef]
  15. Polat, R.; Tarhan, S.; Cetin, M.; Atay, U. Mechanical behaviour under compression loading and some physical parameters of Japanese quail (Coturnix coturnix japonica) eggs. Czech J. Anim. Sci. 2008, 52, 50–56. [Google Scholar] [CrossRef] [Green Version]
  16. Sezer, M. Heritability of Exterior Egg Quality Traits in Japanese Quail. J. Appl. Biol. Sci. 2007, 1, 37–40. [Google Scholar]
  17. Richards, J.; Swanson, M. The relationship of egg shape to shell strength. Poult. Sci. 1965, 44, 1555–1558. [Google Scholar] [CrossRef]
  18. Bain, M. Future considerations. In Eggshell Quality; Chapter 8; Wolfe Publication Ltd.: London, UK, 1991. [Google Scholar]
  19. Altuntaş, E.; Şekeroğlu, A. Effect of egg shape index on mechanical properties of chicken eggs. J. Food Eng. 2008, 85, 606–612. [Google Scholar] [CrossRef]
  20. Biggins, J.D.; Thompson, J.E.; Birkhead, T.R. Accurately quantifying the shape of birds’ eggs. Ecol. Evol. 2018, 8, 9728–9738. [Google Scholar] [CrossRef]
  21. Duursma, D.E.; Gallagher, R.V.; Price, J.J.; Griffith, S.C. Variation in avian egg shape and nest structure is explained by climatic conditions. Sci. Rep. 2018, 8, 4141. [Google Scholar] [CrossRef]
  22. Stoddard, M.C.; Sheard, C.; Akkaynak, D.; Yong, E.H.; Mahadevan, L.; Tobias, J.A. Evolution of avian egg shape: Underlying mechanisms and the importance of taxonomic scale. Ibis 2019, 161, 922–925. [Google Scholar] [CrossRef] [Green Version]
  23. Roberts, J.R. Factors Affecting Egg Internal Quality and Egg Shell Quality in Laying Hens. J. Poult. Sci. 2004, 41, 161–177. [Google Scholar] [CrossRef] [Green Version]
  24. Genchev, A.; Alexieva, D.; Videv, V. Morphological Characteristic of Japanese Quail’s Eggs during Different Stages of Reproductive Cycle; Current Trends in the Development of Fundamental and Applied Sciences; Union of Bulgarian Scientists: Stara Zagora, Bulgaria, 1999; Volume 1, pp. 121–125. (In Bulgarian) [Google Scholar]
  25. Yamamoto, N. Equation of Egg Shaped Curve V. Available online: http://nyjp07.com/index_egg5_E.html (accessed on 2 December 2020).
  26. Todd, P.; Smart, I. The shape of birds’ eggs. J. Theor. Biol. 1984, 106, 239–243. [Google Scholar] [CrossRef]
  27. Mytiai, I.S.; Matsyura, A.V. Mathematical interpretation of artificial ovoids and avian egg shapes (part I). Regul. Mech. Biosyst. 2019, 10, 92–102. [Google Scholar] [CrossRef]
  28. Titova, T.; Nachev, V.; Damyanov, C.; Bozukov, N.; Dinkov, H. Determining the freshness of eggs using spectral data and wavelet network model. In Proceedings of the 56th International Conference for Electronics, Telecomunications, Computers, Automation and Neclear Engeneering (ETRAN 2012), Beograd, Serbia, 11–14 June 2012; Volume 1.5, pp. 1–4. [Google Scholar]
  29. Manzo, M.; Pellino, S. FastGCN + ARSRGemb: A novel framework for object recognition. J. Electron. Imaging 2021, 30, 033011. [Google Scholar] [CrossRef]
Figure 1. Egg contour and defined parameters.
Figure 1. Egg contour and defined parameters.
Applsci 12 00373 g001
Figure 2. 3D egg model and parameters.
Figure 2. 3D egg model and parameters.
Applsci 12 00373 g002
Figure 3. Basic 3D egg shapes.
Figure 3. Basic 3D egg shapes.
Applsci 12 00373 g003
Figure 4. (a) Sparrow, (b) mallard, and (c) quail eggs and their 3D forms.
Figure 4. (a) Sparrow, (b) mallard, and (c) quail eggs and their 3D forms.
Applsci 12 00373 g004
Figure 5. Graph of the function c = f(β/α) for different types of eggs.
Figure 5. Graph of the function c = f(β/α) for different types of eggs.
Applsci 12 00373 g005
Table 1. An algorithm for obtaining 3D model of eggs by visual images.
Table 1. An algorithm for obtaining 3D model of eggs by visual images.
StageDescriptionPseudocode
ALoading an imagei = imread(img)
BRGB-HSV conversioni1 = rgb2hsv(i)
CExtract the S (HSV) color componenti2 = i1(:,:,2)
DBalck and white conversioni3 = im2bw(i2,0.8)
ERemove holes in the imagei3 = imfill(i3,’holes’)
FFiltering an image with a ‘Disk’ type filterh = fspecial(‘disk’, 5);
i3 = imfilter(i3,h)
GObtain basic egg sizes (object in image) and coordinates of mass centerc = regionprops(i3,’all’);
D = cat(1, c.MajorAxisLength);
d = cat(1, c.MinorAxisLength);
cc = cat(1, c.Centroid)
HDetermination of h1, h2, α, βdd1 = sqrt(abs(X(3)-X(1)).^2+abs(X(4)-X(2).^2))
dd2 = sqrt(abs(X1(3)-X1(1)).^2+abs(X1(4)-X1(2).^2))
rx1 = d./2
h1 = sqrt(abs(dd1.^2-rx1.^2))-dd1
h2 = sqrt(abs(dd2.^2-rx1.^2))+dd2
alpha = 2*atan(d/h2).*180/pi
beta = 2*atan(d/h1).*180/pi
IDetermination of the correction factor ‘c’j = beta/alpha
c1 = (159.69*j-157.4)
JDetermining the coordinates of the 3D egg modelx = (a+D1*cos(ph).*sin(th))
y = (a+D1.*cos(th))
z = (b+(d1+c1*cos(th)).*sin(th).*sin(ph))
%(in this case “a” and “b” are the start point coordinates of the coordinate system)
K3D Model Previewsurf(x,y,z, ’FaceColor’, c, ’EdgeColor’, ’k’);
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Share and Cite

MDPI and ACS Style

Zlatev, Z.; Georgieva-Nikolova, M.; Lukanov, H. An Algorithm for Obtaining 3D Egg Models from Visual Images. Appl. Sci. 2022, 12, 373. https://doi.org/10.3390/app12010373

AMA Style

Zlatev Z, Georgieva-Nikolova M, Lukanov H. An Algorithm for Obtaining 3D Egg Models from Visual Images. Applied Sciences. 2022; 12(1):373. https://doi.org/10.3390/app12010373

Chicago/Turabian Style

Zlatev, Zlatin, Mariya Georgieva-Nikolova, and Hristo Lukanov. 2022. "An Algorithm for Obtaining 3D Egg Models from Visual Images" Applied Sciences 12, no. 1: 373. https://doi.org/10.3390/app12010373

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop