Teaching Hands-On Digital Image Processing with morph.py: Methods and Comprehensive Results
DOI:
https://doi.org/10.5753/rbie.2025.5009Keywords:
Computing Education, Digital Image Processing, Colab, Automatic Correction, MCTest, MoodleAbstract
Teaching Digital Image Processing (DIP) presents significant challenges due to mathematical and algorithmic complexities. Although the field has experienced recent growth, there is a lack of comprehensive resources to support effective DIP education. To address this gap, this paper introduces a practical course utilizing a Python library named morph.py, which is designed for beginners and accessible on Google Colab. This interactive course features illustrative examples and hands-on exercises to help learners grasp fundamental DIP concepts and operators. It starts with basic concepts (e.g., image representation) and gradually advances to more complex topics, including image transformations and feature extraction. This work demonstrates how to use morph.py in Colab for teaching materials to tackle different computer vision problems. It also discusses the integration with MCTest and Moodle for assessments with automatic grading, enhancing the reproducibility of the presented method. Additionally, the paper details the use of Safe Exam Browser (SEB) for securing exams. We conducted an exploratory case study in one group (N=15) and gathered their perception through a voluntary survey. Our quantitative analysis provides strong support for the effectiveness of our teaching method based on the morph.py library, successfully addressing the difficulties of teaching DIP to beginners.
Downloads
Referências
Banon, G. J. F., & Barrera, J. (1994). Bases da morfologia matemática para a análise de imagens binárias. UFPE-DI. [GS Search].
Cuisenaire, O. (1999). Distance transformations: Fast algorithms and applications to medical image processing (tech. rep.). Université catholique de Louvain (UCL), Louvain-la-Neuve, Bélgica. [GS Search].
Dougherty, E. R., & Lotufo, R. A. (2003). Hands-on morphological image processing (Vol. 59). SPIE press. https://doi.org/10.1117/3.501104 [GS Search].
García, G. B., & Suárez, O. D. (2015). Learning image processing with opencv. Packt Publishing. [GS Search].
Giannakos, M., Azevedo, R., Brusilovsky, P., Cukurova, M., Dimitriadis, Y., Hernández-Leo, D., Järvelä, S., Mavrikis, M., & Rienties, B. (2024). The promise and challenges of generative ai in education. Behaviour & Information Technology, 1-27. [GS Search].
Gonzalez, R. C., & Woods, R. C. (2009). Processamento digital de imagens (3rd). Pearson Educación. [GS Search].
Huang, C., & Mitchell, O. (1994). A euclidean distance transform using grayscale morphology decomposition. IEEE Transactions on Pattern Analysis and Machine Intelligence, 16(4), 443-448. https://doi.org/10.1109/34.277600 [GS Search].
Hussain, M. (2023). Yolo-v1 to yolo-v8, the rise of yolo and its complementary nature toward digital manufacturing and industrial defect detection. Machines, 11(7), 677. https://doi.org/10.3390/machines11070677 [GS Search].
Jocher, G., Chaurasia, A., & Qiu, J. (2023). Ultralytics yolov8. [Link] [GS Search].
Knuth, D. E. (1984). Literate programming. The Computer Journal, 27(2), 97-111. https://doi.org/10.1093/comjnl/27.2.97 [GS Search].
Konstantinides, K., & Rasure, J. R. (1994). The khoros software development environment for image and signal processing. IEEE Transactions on Image Processing, 3(3), 243-252. https://doi.org/10.1109/83.287018 [GS Search].
Lantuejoul, C., & Beucher, S. (1981). On the use of the geodesic metric in image analysis. Journal of Microscopy, 121(1), 39-49. https://doi.org/10.1111/j.1365-2818.1981.tb01197.x [GS Search].
Lin, T.-Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., & Zitnick, C. L. (2014). Microsoft COCO: Common objects in context. European Conference on Computer Vision, 740-755. https://doi.org/10.1007/978-3-319-10602-148 [GS Search].
Lopes, R. d. A., Kitani, E., Zampirolli, F. A., Yoshioka, L., Celiberto, L. A., & Ibusuki, U. (2023). Revisão sistemática de visão computacional para veículos autônomos agrícolas. 2023 15th IEEE International Conference on Industry Applications (INDUSCON), 485-492. https://doi.org/10.1109/INDUSCON58041.2023.10374618 [GS Search].
López, A. F. J., Pelayo, M. C. P., & Forero, Á. R. (2016). Teaching image processing in engineering using python. IEEE Revista Iberoamericana de Tecnologías del Aprendizaje, 11(3), 129-136. https://doi.org/10.1109/RITA.2016.2589479 [GS Search].
Lotufo, R. A. (2017). Set of functions used in the course IA898 - Digital Image Processing. [Link] [GS Search].
Lotufo, R. A. (2019). Set of functions used in the course IA870 - Mathematical Morphology. [Link] [GS Search].
Lotufo, R. A., Zampirolli, F. A., Junior, R. H., & Barrera, J. (1997). MMachLib functions and MMach operators. Proceedings of the Brazilian Workshop'97 on Mathematical Morphology. [GS Search].
Machado, R. C., Lotufo, R. A., Silva, A. G., & Saúde, A. V. (2003). Adesso: Scientific software development environment. Journal of Computer Science and Technology, 3(1), 1-6. https://journal.info.unlp.edu.ar/JCST/article/view/944 [GS Search].
Machado, R. C., Rittner, L., & Lotufo, R. A. (2011). Adessowiki: Collaborative platform for writing executable papers. Procedia Computer Science, 4, 759-767. https://doi.org/10.1016/j.procs.2011.04.080 [GS Search].
MathWorks. (2024). Mathworks image processing toolbox [Accessed on 8 de janeiro de 2024]. [Link] [GS Search].
Menegola, A., Fornaciali, M., Pires, R., Bittencourt, F. V., Avila, S., & Valle, E. (2017). Knowledge transfer for melanoma screening with deep learning. 2017 IEEE 14th International Symposium on Biomedical Imaging (ISBI 2017), 297-300. https://doi.org/10.1109/ISBI.2017.7950523 [GS Search].
Otsu, N. (1979). A threshold selection method from gray-level histograms. IEEE Transactions on Systems, Man, and Cybernetics, 9(1), 62-66. https://doi.org/10.1109/TSMC.1979.4310076 [GS Search].
Ritter, G., & Sussner, P. (1996). An introduction to morphological neural networks. Proceedings of 13th International Conference on Pattern Recognition, 4, 709-717 vol.4. https://doi.org/10.1109/ICPR.1996.547657 [GS Search].
Rodríguez del Pino, J. C., Rubio Royo, E., & Hernández Figueroa, Z. J. (2010). VPL: Laboratorio virtual de programación para moodle. Jornadas de Enseñanza Universitaria de la Informática, 429-435. [Link] [GS Search].
Rowe, P. M., Cheng, H., Fortmann, L., Wright, A., & Neshyba, S. (2018). Teaching image processing in an upper level CS undergraduate class using computational guided inquiry and polar data. Journal of Computing Sciences in Colleges, 34(1), 171-179. https://dl.acm.org/doi/10.5555/3280489.3280517 [GS Search].
Ryan, T. P. (2013). Sample size determination and power. John Wiley & Sons. https://doi.org/10.1002/9781118439241 [GS Search].
Sage, D., & Unser, M. (2001). Easy java programming for teaching image-processing. Proceedings of the 2001 International Conference on Image Processing (Cat. No. 01CH37205), 3, 298-301. https://doi.org/10.1109/ICIP.2001.958110 [GS Search].
Sage, D., & Unser, M. (2003). Teaching image-processing programming in java. IEEE Signal Processing Magazine, 20(6), 43-52. https://doi.org/10.1109/MSP.2003.1253553 [GS Search].
Silva, A. G., Lotufo, R. A., Machado, R. C., & Saúde, A. V. (2003). Toolbox of image processing using the python language. 2003 International Conference on Image Processing (Cat. No.03CH37429), 3, III-1049. https://doi.org/10.1109/ICIP.2003.1247428 [GS Search].
Singh, S., Lloyd, J., & Flicker, F. (2024). Hamiltonian cycles on ammann-beenker tilings. Physical Review X, 14(3), 031005. https://doi.org/10.1103/PhysRevX.14.031005 [GS Search].
Yahya, A. A. (2019). Teaching digital image processing topics via matlab techniques. International Journal of Information and Education Technology, 9(10), 729-734. https://doi.org/10.18178/ijiet.2019.9.10.1294 [GS Search].
Yaniv, Z., Lowekamp, B. C., Johnson, H. J., & Beare, R. (2018). Simpleitk image-analysis notebooks: A collaborative environment for education and reproducible research. Journal of Digital Imaging, 31(3), 290-303. https://doi.org/10.1007/s10278-017-0037-8 [GS Search].
Yosinski, J., Clune, J., Bengio, Y., & Lipson, H. (2014). How transferable are features in deep neural networks? Advances in Neural Information Processing Systems (NeurIPS 2014), 3320-3328. [Link] [GS Search].
Zampirolli, F. A. (2023). MCTest: Como criar e corrigir exames parametrizados automaticamente [1a Edição]. Edição do Autor. [GS Search].
Zampirolli, F. A., Borovina Josko, J. M., Teubl, F., & Kurashima, C. S. (2024). A practical digital image processing course with morph.py. Anais do IV Simpósio Brasileiro de Educação em Computação (EducComp), 304-313. https://doi.org/10.5753/educomp.2024.237274 [GS Search].
Zampirolli, F. A., & Filipe, L. (2017). A fast CUDA-based implementation for the euclidean distance transform. Proceedings of the International Conference on High Performance Computing & Simulation (HPCS), 815-818. https://doi.org/10.1109/HPCS.2017.123 [GS Search].
Zampirolli, F. A., Pisani, P. H., Borovina Josko, J. M., Kobayashi, G., Fraga, F., Goya, D., & Savegnago, H. R. (2020). Parameterized and automated assessment on an introductory programming course. Anais do XXXI Simpósio Brasileiro de Informática na Educação (SBIE), 1573-1582. https://sol.sbc.org.br/index.php/sbie/article/view/12913 [GS Search].
Zampirolli, F. A., Sato, C. M., Savegnago, H. R., Batista, V. R., & Kobayashi, G. (2021). Automated assessment of parametric programming in a large-scale course. 2021 XVI Latin American Conference on Learning Technologies (LACLO), 357-363. https://doi.org/10.1109/LACLO54177.2021.00079 [GS Search].
Zampirolli, F. A., Teubl, F., & Batista, V. R. (2019). Online generator and corrector of parametric questions in hard copy useful for the elaboration of thousands of individualized exams. Proceedings of the 11th International Conference on Computer Supported Education (CSEDU), 352-359. https://doi.org/10.5220/0007672603520359 [GS Search].
Arquivos adicionais
Published
Como Citar
Issue
Section
Licença
Copyright (c) 2025 Francisco de Assis Zampirolli, João Marcelo Borovina Josko, Fernando Teubl, Celso Setsuo Kurashima, Renato de Avila Lopes

Este trabalho está licenciado sob uma licença Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.

