-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Jeffsan
committed
Feb 28, 2018
1 parent
b512d01
commit 5112e20
Showing
5 changed files
with
12 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
function P = getP(histogram, h, w, bin_indices, grayscale_sequence) | ||
%GETP computes the scores given the histogram | ||
% query the hist for the probability of each pixel | ||
if grayscale_sequence | ||
hist_indices = bin_indices; | ||
else | ||
hist_indices = sub2ind(size(histogram), bin_indices(:,1), bin_indices(:,2), bin_indices(:,3)); | ||
end | ||
|
||
% shape it as a matrix | ||
P = reshape(histogram(hist_indices), h, w); | ||
end |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.