## Main function: application of the Stardist model on each image of the vsi file, detection and classification of chromatophores, saving of results and creation of optional additional result files.
fileResults.write("Sequence;Image area;Number of Light chromatophores;Number of Dark chromatophores;Total area of Light chromatophores;Total area of Dark chromatophores;Average size of Light chromatophores;Average size of Dark chromatophores;Median size of Light chromatophores; Median size of Dark chromatophores;Standard deviation of the size of Light chromatophores;Standard deviation of the size of Dark chromatophores\n")
# path of image
fileEXT=pathFile+"/Process_"+number+".vsi"
# Bioformat reading
ImageVSI=bioformats.ImageReader(path=fileEXT)
# Get metadata of vsi file
metadata=get_metadata(fileEXT)
# Get number of images of vsi file
ifEndisNone:
End=metadata.image(0).Pixels.SizeT
ifstartisNone:
start=0
if"0"inOptionS:
# Criteria to create video capture *****************************************************************************************