Skip to content

Instantly share code, notes, and snippets.

@greeshmariya
greeshmariya / roi_selector_pyr.py
Created May 16, 2018 08:13 — forked from pebbie/roi_selector_pyr.py
automatic roi selector based on automatic scale selection fixed at single point
"""
author : Peb Ruswono Aryan
Automatic selection of ROI rectangle based on single point (assumed target center) selection on the image
Automatic scale selection performed by selecting scale which maximizes laplacian of gaussian in the selected point across scales
intended use : simplifying object tracking target selection, output rectangle can be used as initial target
"""
import os
import sys
import cv2
import numpy as np