Superpixel neighborhoods, as proposed in Fulkerson et. al 2009.
BK = BLOCK_TEST_SEGLOC() Initializes the block with the default options.
BK = BLOCK_TEST_SEGLOC(BK) Executes the block with options and inputs BK.
Required inputs:
- db
The database.
- hist
The segment histograms.
- classifier
The trained segment classifier.
Options:
- bk.rand_seed
Set the random seeds before proceeding. Default of [] does not change the seeds.
- bk.seg_neighbors
The number of neighbors to use. Default 0.
- bk.testall
Test on all segments instead of only training segments. Default 0.
Fetchable attributes:
- test
Classification result (images). Returns [class confidence] for required input: seg_id.
- segtest
Classification result (superpixels). Returns [class confidence] for required input: seg_id. class is a vector Nx1 where N is the number of superpixels. confidence is a matrix Nx1 cell array, where each cell is a Cx1 vector expressing the confidence in each of C classes.