Abstract
Image segmentation is a core research in the image processing and computer vision. In this paper, we suggest a Bi-cubic spline phase transition potential and elaborate a Bi-Cubic spline phase transition potential development. In the image segmentation, we develop the new approach to apply the novel computational fluid dynamics in the boundary with subgrid. The numerical subgrid Bi-cubic method with Bi-Cubic spline for minimizing the piecewise constant energy functional is very efficient, robust and fast in the image segmentation with a multispecies multiphase segmentation models. The subgrid Bi-cubic spline is applied on the boundary with subgrid and the regular grid is applied on the non-boundary. The model generates a multispecies multiphase distribution with Bi-Cubic spline and we can extract the image segments with multispecies multiphase. Finally, we analyze the models and show the numerical results. Numerical results are presented with OCR (Optical Character Recognition) and the medical image.
Similar content being viewed by others
Introduction
Computational image segmentation role is fundamental in the detection, the matching and the tracking from image processing and robot vision1. It is the preprocessing procedure for detecting the object2,3. Numerical Techniques in MATLAB is helpful to simulate the image segmentation code4. The image processing is based on the computational fluid dynamics skills5. In the computational fluid dynamics, there are two major solver to solve the partial differential equations. One is the finite difference scheme (FDS) and the other is the finite element scheme (FES). FES is from Galerkin Scheme. In FES, there are many type of spline to generate Soblev space. We develop a spline to apply from the computational fluid dynamics to image segmentation. Because image intensity is flowing from the high density to the lower density with diffusion. The aim of the image segmentation is to extract the distinct objects and to recognize the object. Our motivation and innovation is to obtain the satisfactory results on the boundary grids. So we suggest and develope the new Bi-cubic spline methods. It is different on the boundary grids from the traditional methods. This is key role with our Bi-cubic spline of image intensity interface on the domain. Image segmentation is also an important role in face recognition. In the face recognition, the optimized classification method can be applied for our futre work6,7. The application of the image segmentation is diverse. In the OCR image, the segmentation is key role to recognize it from the media or CCTV8. In the medical image, it is critical to detect and decompose the tumor part image through the full image. In the security or defense application, it contribute to match the image from the streaming movie9. Their references are in Refs.3,10–15,11,12,13,14,.
Since the image has multispecies multiphase property, multispecies multiphase models with Bi-cubic spline are suggested. We describe the proposed numerical subgrid Bi-cubic spline method between computational fluid dynamics16–18,17, and image intensity computation. In detail, we suggest a Bi-cubic spline phase transition potential and show the numerical results in the several application for image segmentation. Previously, in the image inpainting, the computational fluid dynamics scheme is applied to obtain the conservation law in image intensity. In the image, the critical problem is from the boundary or boundary grid. Our suggested Bi-cubic spline approach in the boundary of the image segmentation is working well. We obtain the satifactory numerical results in image segmentation.
The organization of the paper is as follows. Sect. “Introduction” Bi-cubic spline phase transition potential and methods are described in “Methods”. The numerical results of the image segmentation are presented in “Results”. Conclusion and discussion are given in “Conclusions and discussion”.
Methods
The multiphase approximation model is proposed with K-phase fields from minimizing the Mumford-Shah functional and Allen-Chan equation is applied for the length of the curve C1,19. Additionally, we proposed the new model with a Bi-cubic spline potential. This suggested model has a different Bi-cubic spline phase transition potential \(BiC(\langle \phi \rangle )\) instead of the phase transition potential from the original model. The model of energy functional is the following:
\( \phi \) is phase-field which is meaning the mixing rate (Atwood number) in computational fluid dynamics16,17,18. \(\langle \phi \rangle \) is defined by \(\phi -[\phi ]\), \([\phi ]\): the largest integer not greater than \(\phi \). In the phase transition, we applied a Bi-cubic spline in the image domain and image intensity interface. We suggest and define a Bi-cubic spline phase transition potential \(BiC(\langle \phi \rangle )\) as the following:
From the energy funtional, the first term denomerator’s \(\varepsilon \) is the gradient energy coefficient to the interfacial energy force. In the image application, we denote I for image intensity. \(I_{0}\) is the normalized initial image intensity. \(\Omega \) is the image whole domain of all collections of pixels. From the modified model, the second term, \(\frac{{|\nabla \phi {|^2}}}{2}\) is variation of the transition with the spline (2) between smoothing levels and high oscillation levels. The third term is the source term to fit the model1.
\(\text{ sinc }(\phi )={\sin (\pi \phi )}/{(\pi \phi )}, \phi \in \mathbb {R}. \) Refer to Fig.1. \(\lambda \) is a nonnegative parameter. \(I_{0}\) is the initial image after normalization. Also \(C_{k}\) is the averages of \(I_{0}\) in the regions \(({\phi \in [\frac{k}{K},\frac{k+1}{K}]})\) (\(k=0,1,...,K-1\)) and defined as the following
When \(\phi \) flow attain to a steady state in the image intensity flow, the \(k+1\) level set will become the contour for each individual \(k_{th}\) phase. For this purpose we get the following gradient descent flow equation:
We show numerical subgrid Bi-cubic spline method for the Mumford-Shah functional. It is the modified model methods with the image intensity in 3D spline \(=\) 2D spline X 2D spline.
The image intensity function is in three dimensional space. The image intensity function values is from 0 to 255 but it is rescaled from 0 to 1. First, we discretize two dimensional space of the domain, \(\Omega = (a,b) \times (c,d)\) as a evenly discretized regular domain setting. Let \(N_x\) and \(N_y\) be positive even integers, \(h = \frac{ (b-a)}{N_x}\) be the uniform mesh size, and \(\Omega _{h} = \{ (x_i,y_j) : x_i = (i-\frac{1}{2})h,~ y_j = (j-\frac{1}{2})h, ~ 1 \le i \le N_{x}, ~ 1 \le j \le N_y \}\) be the set of the cell centers for the computational domain. Through the cell centers, we generate the subgrid on the domain. Let \(\phi _{ij}^n\) be approximations of \(\phi ({x_i},{y_j},n \Delta t)\), where \(\Delta t=T/N_t\) is the time step, T is the final time, and \(N_t\) is the total number of time steps. By using these grid and subgrid on the boundary, we propose the following numerical subgrid Bi-cubic spline methods.
In Eq. (6), RHS’ the first term with Bi-cubic spline can be transformed to the following:
and
Finally, the RHS of the Eq. (6) with Bi-cubic spline can be transformed to the following: \(A=(\phi ^{n+1})^3 + (\phi ^{n-1})^3\),
Briefly, in our first numerical result, we will show that above computation results in the OCR (Optical Character Recognition) test, shown in Fig. 2.
Figure 2 shows the application of the images by using our proposed model to OCR (Optical Character Recognition). After ten iterations, we have the segmentation image. The computational domain \(\Omega =(0,1)\times (0,1)\) with a \(256\times 256\) mesh. The interface parameter \(\varepsilon _{2}\) and time step \(\Delta t=5\)E\(-6\) are used.
We show the suggested Bi-cubic spline algorithm procedure to solve the image segmentation problems (6) which is the following:
- Step 1.:
-
Normalize the image intensity values [0,1] from [0, 255].
- Step 2.:
-
Compute \({BiC'(\langle \phi ^{n+1}\rangle +\langle \phi ^{n-1}\rangle )}\) by using Bi-cubic spline phase transition and the gradient energy coefficient to the interfacial energy force, \(\varepsilon \).
- Step 3.:
-
Compute \(\phi ^{n-1}\), \(\phi ^{n+1}\),\(\phi ^{n-\frac{1}{2}}\), \(\phi ^{n+\frac{1}{2}}\) and update all computational domain with the subgrid boundary.
- Step 4.:
-
Compute (6) and update the interior grid cells on the domain and subgrid cells on the boundary domain.
Results
In this section, we present some numerical results by our proposed modified models with Bi-cubic spline. We applied this models, the numerical scheme and solutions to the medical image. This methods can be extended and applied to the panoramic image, the blurred image and the shaken image for our future works. It can be realized that our proposed scheme is fast, accurate, and robust. In our numerical experiments, we normalize the given image intensity I with the spline (2) as \(I_{0}=\frac{I-I_{min}}{I_{max}-I_{min}}\), where \(I_{max}\) and \(I_{min}\) are the maximum and the minimum values of the given image, respectively. Through this normalization with the spline (2), the initial image intensity function, \(I_0 \in [0,1]\). Then the mixing interfacial regions with RGB or Gray level \(\in [0,1]\). The interfacial concentration rate with the spline (2) varies from 0.1 to 0.9. The approximate distance measurement can be calculated by \( 4\sqrt{2} \varepsilon \tanh ^{-1}(0.9) \). We take the gradient energy parameter for the interfacial energy force, \(\varepsilon _m = \frac{hm}{\alpha },\) with \(\alpha ={4\sqrt{2} \tanh ^{-1}(0.9)}\) and m gird points for subgrid, h uniform grid steps. After we initialized \(\phi =KI_{0}\) with the spline (2) and K-phase, we obtain the reasonable numerical results. See the following figures.
Figure 3 shows the several images results with our model to the oil painting image. The original image is from the OpenCV Website20. The original is the open image. After ten iterations, we have the segmentation image. The computational domain \(\Omega =(0,1)\times (0,1)\) with a \(256\times 256\) mesh. The interface parameter \(\varepsilon _{2}\) and time step \(\Delta \) t = 5x\(10^{-6}\).
Figures 4 and 5 shows the application of the images by using our proposed model to a magnetic resonance imaging (MRI) brain image.
Conclusions and discussion
In this paper, we propose new image segmentation methods with the Bi-cubic spline (2) which is from the computational fluid dynamics scheme, the finite element scheme (FES). In the computational fluid dynamics (CFD), there are many novel approach to solve the partial differential equations. This is valuable time to apply image segmentation from the computational fluid dynamics. Our suggested methods are fast, robust and accurate. Therefore, we obtain the satisfactory results in the image segmentation. Especially, OCR (Optical Character Recognition) and the medical image are applied in the application image. From OCR images, we obtian the satisfactory results through adjusting \(\phi \) values. From the brain images, we obtain the tumor part segmentation from the malignant image by adjusting \(\phi \) values. We have some difficulty to obtain the real physical and medical images to investigate the data and methods comparison. This methods can be also apply to the satellite image. The several parameter of the suggested models can be adjusted to have the demanding results in the segmentation of image. This new image segmentation methods can be applied to develope the artificial intelligence about detecting several objects or obstacles. In the future works, we can develop the conservation law scheme with the volume fraction in image inpainting with the computational fluid dynamics.
Data availability
All data generated or analyzed during this research are included in this paper. This data is available from this paper. If you need to have further information, then email to the author.
References
Jung, Y. M., Kang, S. H. & Shen, J. Multiphase image segmentation via Modica-Mortola phase transition. SIAM J. Appl. Math. 67, 1213–1232 (2007).
Kim, D., Sun, X., Choi, J., Lin, S., & Kweon, I. Detecting human-object interactions with action cooccurrence priors. European Conference on Computer Vision, pp. 718–736, ECCV (2020).
Morel, J.-M. & Solimini, S. Variational methods in image segmentation. Prog. Nonlinear Differential Equationa Appl. (1995)
Briggs, W. L. A Multigrid Tutorial (SIAM, 1987).
Kim, D. Numerical simulation of single-mode 3D Rayleigh-Taylor instability. Model. Simulat. Eng. 6544820, 6. https://doi.org/10.1155/2022/6544820 (2022).
Kim, D. An optimized discrete data classification method in N-dimensional. Computat. Math. Methods. 8199872, 8. https://doi.org/10.1155/2022/8199872 (2022).
Kim, Dongyung. Computational optimized monitoring methodology to avoid crowd crush accidents with scattered data. Appl. Math. 2(4), 711–720. https://doi.org/10.3390/appliedmath2040042 (2022).
Patel, C., Patel, A. & Patel, D. Optical character recognition by open source OCR tool tesseract: A case study. in Int. J. Comput. Appl. 55(10) (2012).
Arce, G. R., Paredes, J. L. & Mullan, J. Nonlinear filtering for image analysis and enhancement. in (Bovik, A.L. Ed.) Handbook of Image and Video Processing (Academic Press, 2000).
Burger, M., He, L., & Schöenlieb, C. Cahn-Hilliard inpainting and a generalization for grayvalue images. UCLA CAM report 08-41 (2008).
Bertalmio, M., Sapiro, G., Caselles, V., & Ballester, C. It Image inpainting. Proc. of SIGGRAPH 2000, New Orleans, USA (2000).
Chan, T. F. & Shen, J. Mathematical models for local non-texture inpaintings. SIAM J. Appl. Math. 62, 1019–1043 (2001).
Kang, H., Efros, A. A., Hebert, M., & Kanade, T. ’Image matching in large scale indoor environment’, 2009 IEEE Computer Society Conference on Computer Vision and Pattern Recognition Workshops, 33–40 (2009). https://doi.org/10.1109/CVPRW.2009.5204357
Lie, J., Lysaker, M. & Tai, X.-C. A binary leve set model and some applications to Mumford-Shah image segmentation. IEEE Trans. Image Process. 15(5), 1171–1181 (2006).
Vese, L. A. & Chan, T. F. A multiphase level set framework for image segmentation using the mumford and shah model. Int. J. Comp. Vis. 50, 271–293 (2002).
Bo, W. et al. Comparison and validation of multi phase closure models. Comput. Math. Appl. 56(5), 1291–1302. https://doi.org/10.1016/j.camwa.2008.02.030 (2008).
Kim, D. Conservative data collection and comparison study for front-tracking. State University of New York at Stony Brook, Ph.D Dissertations Publishing, (2009).
Lim, H. et al. Multiscale models for fluid mixing. Comput. Methods Appl. Mech. Eng. 197(43–44), 3435–3444. https://doi.org/10.1016/j.cma.2008.02.027 (2008).
Li, Y. & Kim, J. An unconditionally stable hybrid method for image segmentation. Appl. Numer. Math. 82, 32–43 (2014).
Lakshmi, A., Arivoli, T. Computer aided diagnosis system for brain tumor detection and segmentation. J. Theor. Appl. Inform. Technol. 64(02), 1–7.
Acknowledgements
The author is the dual faculty of Phoenix College and Chandler-Gilbert Community College (Maricopa Community College District). APC is supported by YOON SEUL EYE CLINIC, 927 Gyebaek-ro, Yuseong-gu, Daejeon, Republic of Korea. Thanks to Dr. Jonghyun Lee, the chief of YOON SEUL EYE CLINIC.
Author information
Authors and Affiliations
Contributions
D.K. conceived and designed the research problems. D.K. developed the mathematical image segmentation formula with spline and wrote the paper.
Corresponding author
Ethics declarations
Competing interests
The author declares no competing interests.
Additional information
Publisher's note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article’s Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article’s Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.
About this article
Cite this article
Kim, D. Numerical subgrid Bi-cubic methods of partial differential equations in image segmentation. Sci Rep 14, 8387 (2024). https://doi.org/10.1038/s41598-024-54855-7
Received:
Accepted:
Published:
DOI: https://doi.org/10.1038/s41598-024-54855-7
Keywords
Comments
By submitting a comment you agree to abide by our Terms and Community Guidelines. If you find something abusive or that does not comply with our terms or guidelines please flag it as inappropriate.