Skip to main content

Advertisement

Log in

Mark3D – A semi-automated open-source toolbox for 3D head- surface reconstruction and electrode position registration using a smartphone camera video

  • Original Article
  • Published:
Medical & Biological Engineering & Computing Aims and scope Submit manuscript

Abstract

Source localization in EEG necessitates co-registering the EEG sensor locations with the subject’s MRI, where EEG sensor locations are typically captured using electromagnetic tracking or 3D scanning of the subject’s head with EEG cap, using commercially available 3D scanners. Both methods have drawbacks, where, electromagnetic tracking is slow and immobile, while 3D scanners are expensive. Photogrammetry offers a cost-effective alternative but requires multiple photos to sample the head, with good spatial sampling to adequately reconstruct the head surface. Post-reconstruction, the existing tools for electrode position labelling on the 3D head-surface have limited visual feedback and do not easily accommodate customized montages, which are typical in multi-modal measurements. We introduce Mark3D, an open-source, integrated tool for 3D head-surface reconstruction from phone camera video. It eliminates the need for keeping track of spatial sampling during image capture for video-based photogrammetry reconstruction. It also includes blur detection algorithms, a user-friendly interface for electrode and tracking, and integrates with popular toolboxes such as FieldTrip and MNE Python. The accuracy of the proposed method was benchmarked with the head-surface derived from a commercially available handheld 3D scanner Einscan-Pro + (Shining 3D Inc.,) which we treat as the “ground truth”. We used reconstructed head-surfaces of ground truth (G1) and phone camera video (M1080) to mark the EEG electrode locations in 3D space using a dedicated UI provided in the tool. The electrode locations were then used to form pseudo-specific MRI templates for individual subjects to reconstruct source information. Somatosensory source activations in response to vibrotactile stimuli were estimated and compared between G1 and M1080. The mean positional errors of the EEG electrodes between G1 and M1080 in 3D space were found to be 0.09 ± 0.01 mm across different cortical areas, with temporal and occipital areas registering a relatively higher error than other regions such as frontal, central or parietal areas. The error in source reconstruction was found to be 0.033 ± 0.016 mm and 0.037 ± 0.017 mm in the left and right cortical hemispheres respectively.

Graphical Abstract

This is a preview of subscription content, log in via an institution to check access.

Access this article

Subscribe and save

Springer+ Basic
$34.99 /Month
  • Get 10 units per month
  • Download Article/Chapter or eBook
  • 1 Unit = 1 Article or 1 Chapter
  • Cancel anytime
Subscribe now

Buy Now

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9

Similar content being viewed by others

References

  1. Koessler L, Cecchin T, Caspary O, Benhadid A, Vespignani H, Maillard L (2011) EEG-MRI co-registration and sensor labeling using a 3D laser scanner. Ann Biomed Eng 39(3):983–995. https://doi.org/10.1007/s10439-010-0230-0

    Article  PubMed  CAS  Google Scholar 

  2. Whalen C, Maclin EL, Fabiani M, Gratton G (2008) Validation of a method for coregistering scalp recording locations with 3D structural MR images. Hum Brain Mapp 29(11):1288–1301. https://doi.org/10.1002/hbm.20465

    Article  PubMed  Google Scholar 

  3. Brinkmann BH, O’Brien TJ, Dresner MA, Lagerlund TD, Sharbrough FW, Robb RA (1998) Scalp-recorded EEG localization in MRI volume data. Brain Topogr 10(4):245–253. https://doi.org/10.1023/A:1022266822252

    Article  PubMed  CAS  Google Scholar 

  4. Koessler L, Cecchin T, Ternisien E, Maillard L (2010) 3D handheld laser scanner based approach for automatic identification and localization of EEG sensors. In: 2010 Annual International Conference of the IEEE Engineering in Medicine and Biology Society, EMBC’10, pp 3707–3710. https://doi.org/10.1109/IEMBS.2010.5627659.

  5. Shirazi SY, Huang HJ (2019) More reliable EEG electrode digitizing methods can reduce source estimation uncertainty, but current methods already accurately identify brodmann areas. Front Neurosci 13(November):1–14. https://doi.org/10.3389/fnins.2019.01159

    Article  Google Scholar 

  6. Taberna GA, Marino M, Ganzetti M, Mantini D (2018) Spatial localization of EEG electrodes using 3D scanning, 2D Materials, pp 0–23 [Online]. Available: https://doi.org/10.1088/2053-1583/abe778

  7. Molnár B (2010) Direct linear transformation based photogrammetry software on the web, ISPRS commission vol. XXXVIII, pp 5–8 [Online] Available: http://www.isprs.org/proceedings/XXXVIII/part5/papers/130.pdf

  8. El-Ashmawy KLA (2018) Using direct linear transformation (DLT) method for aerial photogrammetry applications. Geodesy and Cartography 44(3):71–79. https://doi.org/10.3846/gac.2018.1629

    Article  Google Scholar 

  9. Györfi O et al (2022) Accuracy of high-density EEG electrode position measurement using an optical scanner compared with the photogrammetry method. Clin Neurophysiol Pract 7:135–138. https://doi.org/10.1016/j.cnp.2022.04.002

    Article  PubMed  PubMed Central  Google Scholar 

  10. Clausner T, Dalal SS, Crespo-García M (2017) Photogrammetry-based head digitization for rapid and accurate localization of EEG electrodes and MEG fiducial markers using a single digital SLR camera. Front Neurosci 11(MAY):1–12. https://doi.org/10.3389/fnins.2017.00264

    Article  Google Scholar 

  11. Baysal U, Şengül G (2010) Single Camera photogrammetry system for EEG electrode identification and localization. Ann Biomed Eng 38(4):1539–1547. https://doi.org/10.1007/s10439-010-9950-4

    Article  PubMed  Google Scholar 

  12. Qian S, Sheng Y (2011) A single camera photogrammetry system for multi-angle fast localization of EEG electrodes. Ann Biomed Eng 39(11):2844–2856. https://doi.org/10.1007/s10439-011-0374-6

    Article  PubMed  Google Scholar 

  13. Mazzonetto I, Castellaro M, Cooper RJ, Brigadoi S (2022) Smartphone-based photogrammetry provides improved localization and registration of scalp-mounted neuroimaging sensors. Sci Rep 12(1):1–14. https://doi.org/10.1038/s41598-022-14458-6

    Article  CAS  Google Scholar 

  14. Homölle S, Oostenveld R (2019) Using a structured-light 3D scanner to improve EEG source modeling with more accurate electrode positions. J Neurosci Methods 326(February):108378. https://doi.org/10.1016/j.jneumeth.2019.108378

    Article  PubMed  Google Scholar 

  15. Oostenveld R, Fries P, Maris E, Schoffelen JM (2011) FieldTrip: Open source software for advanced analysis of MEG, EEG, and invasive electrophysiological data. Comput Intell Neurosci 2011. https://doi.org/10.1155/2011/156869

  16. Bradski G (200) The OpenCV library, Dr. Dobb’s Journal of Software Tools

  17. AliceVision (2018) “Meshroom: A 3D reconstruction software.” [Online]. Available: https://github.com/alicevision/meshroom

  18. Castaño DM (2020) Meshroom_CLI. [Online]. Available: https://github.com/davidmoncas/meshroom_CLI

  19. Enesi I, Kuqi A (2022) Analyzing parameters in 3D reconstruction photogrammetry in Meshroom, a case study. 2022 11th Mediterranean Conf mbedded Comput MECO 2022:7–10. https://doi.org/10.1109/MECO55406.2022.9797170

    Article  Google Scholar 

  20. Gramfort A et al (2013) MEG and EEG data analysis with MNE-Python. Front Neurosci 7(7 DEC):1–13. https://doi.org/10.3389/fnins.2013.00267

    Article  Google Scholar 

  21. Sullivan C, Kaszynski A (2019) PyVista: 3D plotting and mesh analysis through a streamlined interface for the Visualization Toolkit (VTK). J Open Source Software 4(37):1450. https://doi.org/10.21105/joss.01450

    Article  Google Scholar 

  22. Willman J (2021) Modern PyQt. https://doi.org/10.1007/978-1-4842-6603-8

  23. Ganguly S, Koppula A, Sridharan KS Modelling the early affect response to vibrotactile stimulation in the cortex. A source - based spatiotemporal analysis. TechRxiv 1–15. https://doi.org/10.36227/techrxiv.170975047.74079227

  24. Kim MY, Kwon H, Yang TH, Kim K (2020) Vibration alert to the brain. Evoked and induced MEG responses to high-frequency vibrotactile stimuli on the index finger of dominant and non-dominant hand. Front Human Neurosci 14. https://doi.org/10.3389/fnhum.2020.576082

  25. Burton H, Sinclair RJ, McLaren DG (2004) Cortical activity to vibrotactile stimulation: An fMRI study in blind and sighted individuals. Hum Brain Mapp 23(4):210–228. https://doi.org/10.1002/hbm.20064

    Article  PubMed  PubMed Central  Google Scholar 

  26. Coghill RC et al (1994) Distributed processing of pain and vibration by the human brain. J Neurosci 14(7):4095–4108. https://doi.org/10.1523/jneurosci.14-07-04095.1994

    Article  PubMed  PubMed Central  CAS  Google Scholar 

  27. Hari R (1980) Evoked potentials elicited by long vibrotactile stimuli in the human EEG. Pflügers Archiv Euro J Physiol 384(2):167–170. https://doi.org/10.1007/BF00584434

    Article  CAS  Google Scholar 

  28. Beltrachini L, von Ellenrieder N, Muravchik CH (2011) General bounds for electrode mislocation on the EEG inverse problem. Comput Methods Programs Biomed 103(1):1–9. https://doi.org/10.1016/j.cmpb.2010.05.008

    Article  PubMed  CAS  Google Scholar 

  29. Everitt A et al. (2023) EEG electrode localization with 3D iPhone scanning using point-cloud electrode selection (PC-ES). J Neural Eng 20(6). https://doi.org/10.1088/1741-2552/ad12db

Download references

Acknowledgements

This study was supported by the Ministry of Education under the Prime Minister’s Research Fellowship, Department of Science and Technology – Science and Heritage Research Initiative (DST-SHRI)- DST/TDT/SHRI-34/2021 and Science and Technology Research Board (SERB-SRG)-SRG/2019/000847.

Author information

Authors and Affiliations

Authors

Contributions

The study was conceptualized by KSS and designed by him, MR and SG. Material preparation was carried out by SG. Data collection was done by SG, AK and MMC. Analysis was performed by SG, AJ and MMC. The first draft of the manuscript was written by SG and all other authors commented on previous versions of the manuscript. All authors read and approved the final manuscript.

Corresponding author

Correspondence to Kousik Sarathy Sridharan.

Ethics declarations

Competing interests

The authors declare no conflict of interest in this study.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

Rights and permissions

Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Ganguly, S., Chhaya, M.M., Jain, A. et al. Mark3D – A semi-automated open-source toolbox for 3D head- surface reconstruction and electrode position registration using a smartphone camera video. Med Biol Eng Comput 63, 835–847 (2025). https://doi.org/10.1007/s11517-024-03228-3

Download citation

  • Received:

  • Accepted:

  • Published:

  • Issue Date:

  • DOI: https://doi.org/10.1007/s11517-024-03228-3

Keywords