本帖最后由 wenluderen 于 2020-8-13 08:07 编辑
* Load and split the dataset.
create_dict (GenParamDataset)//所谓字典就是一个结构体
set_dict_tuple (GenParamDataset, 'image_sub_dirs', ImageSubDirs)//修改结构体里面的参数:image_sub_dirs
(ImageSubDirs := ['good','broken_large','broken_small','contamination'])
(
)
*Generate a DLDataset dictionary for anomaly detection.创建一个数据集 ,用于异常检测
read_dl_dataset_anomaly (ImageDir, AnomalyDir, [], [], GenParamDataset, DLDataset)
*参数1:ImageDir--Base directory of the folders containing the images
* ImageDir := HalconImages + '/bottles'
*参数2:AnomalyDir--Base directory of the folders containing the anomaly ground truth files
* AnomalyDir := HalconImages + '/labels/bottles'
*参数3:ImageList (input_control)
*List of image paths. If it is an empty tuple, the image list is generated automatically
*参数4:AnomalyList (input_control)
*List of paths of anomaly ground truth files. If it is an empty tuple, the anomaly list is generated automatically.
*参数5:GenParam (input_control)
*GenParam is a dictionary, which can be used to constrain the generated image and anomaly file lists.
*参数6:DLDataset---The generated dataset dictionary.
×××
*********
之前一直没有搞清楚是为什么是99,后来才发现是0-99 那就是100的意思的
就说说有100 个图片素材, 那么这100个图片素材都是从哪里来的呢?
|