def process(self, jobid, filename): heatmap_filepath = access.heatmap_filepath(jobid) control_image = access.specific_image(jobid, 0) retail_json = access.out_filepath(jobid, "retail.json") retail_jpeg = access.out_filepath(jobid, "retail.jpeg") retail.create_retail(heatmap_filepath, retail_json, self.hotdog_limit) retail.create_retail_img(control_image, retail_json, retail_jpeg)
def process(self, jobid, filename): heatmap_filepath = access.heatmap_filepath(jobid) period = self._period(filename) img_files = access.image_filepaths(jobid) heatmap.record_heatmap(heatmap_filepath, img_files, period, self.window_size, self.color_thresh)
def process(self, jobid, filename): heatmap_filepath = access.heatmap_filepath(jobid) crowd_total_fp = access.out_filepath(jobid, "total.json") crowd.write_total(heatmap_filepath, crowd_total_fp) series_filepath = access.series_filepath(jobid) crowd_frequencies_fp = access.out_filepath(jobid, "frequencies.json") crowd.write_frequency(series_filepath, crowd_frequencies_fp, self.units, self.aggregate)
def process(self, jobid, filename): heatmap_filepath = access.heatmap_filepath(jobid) interval = ProjectIntervalChecker(self.manifest, self.json, filename, heatmap_filepath) if interval.should_update(): project_fp = access.out_filepath(jobid, "project.bmp") heatmap.project_heatmap(heatmap_filepath, project_fp, self.project_width, interval.time_taken())
def process(self, jobid, filename): heatmap_filepath = access.heatmap_filepath(jobid) view_heatmap_fp = access.out_filepath(jobid, "heatmap.bmp") heatmap.view_heatmap(heatmap_filepath, view_heatmap_fp) overlay_fp = access.out_filepath(jobid, "overlay.bmp") control_fp = access.specific_image(jobid, self.manifest.control_img()) heatmap.overlay_heatmap(heatmap_filepath, control_fp, overlay_fp, self.manifest.scale(), self.manifest.blur())
def process(self, jobid, filename, heatmap_filepath=None): if not heatmap_filepath: heatmap_filepath = access.heatmap_filepath(jobid) interval = UpdateIntervalChecker(self.manifest, self.json, filename, heatmap_filepath) if interval.should_update(): msg = "Updating for img: {}".format(interval.time_taken()) logger.debug(msg) img_files = access.image_filepaths(jobid) heatmap.record_heatmap(heatmap_filepath, img_files, interval.period(), self.window_size, self.color_thresh) else: msg = "Not updating for img: {}".format(interval.time_taken()) logger.debug(msg)
def gen_heatmap(jobid): heatmap_filepath = access.heatmap_filepath(jobid) manifest = access.manifest(jobid) heatmap.new_heatmap(heatmap_filepath, manifest)