Skip to content

Commit

Permalink
Update density.m
Browse files Browse the repository at this point in the history
  • Loading branch information
shizenglin committed Aug 29, 2019
1 parent 8081d0f commit 50b88df
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions data/density.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
end
image = imread(image_path);
load(position_head_path);
position_head = annPoints;
position_head = annPoints;%annPoints is created by load(position_head_path), whcih varies from different datasets.
distance_mat = distance(position_head, k);
density_map = zeros(floor(size(image,1)), floor(size(image,2)));
avg_var_list = compute_avg_var(image, position_head, distance_mat);
Expand Down Expand Up @@ -47,8 +47,8 @@
var_list = zeros(head_num);
avg_var_list = zeros(head_num);

avg_w = floor(size(image,1)/16.0);
avg_h = floor(size(image,2)/16.0);
avg_w = floor(size(image,1)/16.0);%16.0 is the width of local region R in equation 7 of the paper
avg_h = floor(size(image,2)/16.0);%16.0 is the height of local region R in equation 7 of the paper

for pid = 1:head_num
var_list(pid) = 0.3 * mean(distance_mat(pid, :));
Expand Down

0 comments on commit 50b88df

Please sign in to comment.