Saliency map generated by back projecting the image histogram on itself, and refinement with Grabcut.
Python
Switch branches/tags
Nothing to show
Clone or download
jacobgil Merge pull request #2 from hareshkh/minor-fix
Fixes : 'ValueError: too many values to unpack'
Latest commit a86807b Apr 7, 2018
Permalink
Failed to load latest commit information.
images example images Apr 24, 2015
README.md Update README.md Apr 24, 2015
saliency.py Fixes : 'ValueError: too many values to unpack' Apr 7, 2018

README.md

saliency-from-backproj

Saliency map generated by back projecting the image histogram on itself, and refinement with Grabcut.

Backprojection based saliency Backprojection based saliency Backprojection based saliency Backprojection based saliency

Usage example:

img = cv2.imread(image.jpg, 1)
img = cv2.resize(img, (640/2, 480/2))
mask = backprojection_saliency(img)
segmentation = img*mask[:,:,np.newaxis]

For more details refer here.