コード例 #1
0
        } //end method peak_score_image_array()

        private static Segmentation_Image_Rep[] fused_image_vals_above_dynamic_threshold(Segmentation_Image_Rep[] image_readings_in_chunk)
        {
            //THIS METHOD IS RESPONSIBLE FOR TAKING IN THE MANIPULATED SENSOR VALUES ASSOCIATED WITH ALL THE IMAGES IN A PARTICULAR CHUNK
            //AND THEN PERFORMS DYNAMIC THRESHOLDING ON ALL THE VALUES TO
            //DETERMINE WHICH IMAGES ARE LIKELY TO BE EVENT BOUNDARIES

            //1. GET THE RELEVANT VALUES INTO A DOUBLE ARRAY
            double[] manipulated_image_values = get_all_fused_values_into_double_array(image_readings_in_chunk);


            //2. GET THE THRESHOLD FIGURE BASED ON THOSE VALUES
            double threshold_value = Thresholding.get_threshold_value(manipulated_image_values);


            //3. GO THROUGH ALL THE SENSOR READINGS AND ONLY STORE THOSE THAT ARE ABOVE THE THRESHOLD
            Segmentation_Image_Rep[] images_above_threshold = Thresholding.vals_above_threshold(image_readings_in_chunk, threshold_value);

            //AD fix on 25/01/11
            //if no boundary image has been identified in this chunk, we'll just select the middle image to break it up
            //this is in response to later processing steps seeing no boundary for a chunk, and then presuming we don't want to see any images from it
            //so now the code below fixes this...
            if (images_above_threshold.Length == 0)
            {
                try
                {
                    //now make boundary image, the middle image in this chunk...
                    images_above_threshold = new Segmentation_Image_Rep[] { image_readings_in_chunk[image_readings_in_chunk.Length / 2] };
                } //close try...
                catch (Exception excep) { }; //close try...catch
            }     //close if (images_above_threshold.Length == 0)...

            //4. RETURN THE NEW LIST OF SENSOR READINGS THAT ARE ABOVE THAT THRESHOLD
            return(images_above_threshold);
        } //end method sensor_vals_above_dynamic_threshold()
コード例 #2
0
        } //end method get_boundary_times_for_all_non_csv_images()

        private static Segmentation_Image_Rep[] fused_image_vals_above_dynamic_threshold_non_csv(Segmentation_Image_Rep[] image_readings_in_chunk)
        {
            //THIS METHOD IS RESPONSIBLE FOR TAKING IN THE MANIPULATED SENSOR VALUES ASSOCIATED WITH ALL THE IMAGES IN A PARTICULAR CHUNK
            //AND THEN PERFORMS DYNAMIC THRESHOLDING ON ALL THE VALUES TO
            //DETERMINE WHICH IMAGES ARE LIKELY TO BE EVENT BOUNDARIES

            //1. GET THE RELEVANT VALUES INTO A DOUBLE ARRAY
            double[] manipulated_image_values = get_all_fused_values_into_double_array(image_readings_in_chunk);


            //2. GET THE THRESHOLD FIGURE BASED ON THOSE VALUES
            double threshold_value = Thresholding.get_non_csv_threshold(manipulated_image_values);

            //3. GO THROUGH ALL THE SENSOR READINGS AND ONLY STORE THOSE THAT ARE ABOVE THE THRESHOLD
            Segmentation_Image_Rep[] images_above_threshold = Thresholding.vals_above_threshold(image_readings_in_chunk, threshold_value);


            //4. RETURN THE NEW LIST OF SENSOR READINGS THAT ARE ABOVE THAT THRESHOLD
            return(images_above_threshold);
        } //end method fused_image_vals_above_dynamic_threshold_non_csv()