microsoft / SmartKC-A-Smartphone-based-Corneal-Topographer

This is the official implementation for the SmartKC project. SmartKC is a smartphone based corneal topographer.
Creative Commons Attribution 4.0 International
37 stars 14 forks source link

How to evaluate gap_top with python scripts #5

Open jaggzh opened 2 years ago

jaggzh commented 2 years ago

I'm trying to find, in the python code, how we can go about obtaining and setting the gap_base, as it differs between mobile devices (the distance between camera and base of placido attachment). (Section 5.3 of pdf, down at "Measuring camera-attachment distance").

Anyone know? I can't find support for it.

sidgairo18 commented 2 years ago

Hi,

parser.add_argument( "--gap2", default=5, type=float, help="Accounting for gap (in mm) between camera pupil and smallest ring.", )

setting args.gap2 should do the job. args.gap2 -> gap_base args.gap1 -> gap_top

args.gap2 should be identified for a phone and placido setup, and fixed then.

# call function to run pipeline and generate_topography_maps
# expects image to be in .jpg format
error = corneal_top_obj.generate_topography_maps(
    base_dir,
    image_name,
    center=center,
    downsample=True,
    blur=True,
    err1=[args.gap1],
    err2=[args.gap2],
    )