public static void generateVideoForEvaluation(List <Image> Images, List <DateTime> dateTimeList, MultiObjectTrackingResult ctts, String videoName, String directory)
        {
            List <Image> imagesWithTracks = new List <Image>();

            for (int i = 0; i < Images.Count; i++)
            {
                List <BoundingBox> locations = new List <BoundingBox>();
                List <string>      labels    = new List <string>();
                Dictionary <string, List <bool> > attributes = new Dictionary <string, List <bool> >();
                attributes.Add("occlusion", new List <bool>());

                if (ctts.tracks.Count != 0)
                {
                    foreach (string key in ctts.tracks[0].booleanAttributeTracks.Keys)
                    {
                        if (!attributes.ContainsKey(key))
                        {
                            attributes.Add(key, new List <bool>());
                        }
                    }
                }

                List <int> idx = new List <int>();

                for (int j = 0; j < ctts.tracks.Count; j++)
                {
                    CompressedTrack ct = ctts.tracks[j];
                    SpaceTime       st = ct.getSpaceTimeAt(dateTimeList[i]);

                    BooleanAttribute outofview_attr = ct.getAttributeAt("outofview", dateTimeList[i]);
                    if (st != null && outofview_attr != null && !outofview_attr.value)
                    {
                        BoundingBox l = st.region;
                        locations.Add(l);
                        labels.Add(ctts.tracks[j].label);
                        foreach (string key in attributes.Keys)
                        {
                            attributes[key].Add(ct.getAttributeAt(key, dateTimeList[i]).value);
                        }

                        idx.Add(j);
                    }
                }
                Image new_image = generateTrackImage(Images[i], labels, locations, attributes, idx);
                imagesWithTracks.Add(new_image);
            }

            Console.WriteLine("Saving " + directory + "\\" + videoName);
            FFMpegWrappers.generateVideoFromFrames(imagesWithTracks, videoName, directory);

            //Directory.CreateDirectory(directory + "\\" + videoName);
            //Console.WriteLine("Saving " + directory + "\\" + videoName);
            //for (int i = 0; i < imagesWithTracks.Count; i++)
            //{

            //    imagesWithTracks[i].Save(directory + "\\" + videoName + "\\img" + i.ToString("000") + ".jpg");
            //}
            //Console.WriteLine("done");
        }