Commit 6402a374 authored by Davis King's avatar Davis King

Made --resample use a 64bit hash of the image data

in the file names to make it so there won't ever be any name conflicts
in the cropped images.
parent 7c828d08
......@@ -637,7 +637,11 @@ int resample_dataset(const command_line_parser& parser)
p.second = tform.get_tform()(p.second);
dimg.boxes.push_back(box);
}
dimg.filename = data.images[i].filename + "RESAMPLED"+cast_to_string(j)+".png";
// Put a 64bit hash of the image data into the name to make sure there are no
// file name conflicts.
std::ostringstream sout;
sout << hex << murmur_hash3_128bit(&chip[0][0], chip.size()*sizeof(chip[0][0])).second;
dimg.filename = data.images[i].filename + "_RESAMPLED_"+sout.str()+".png";
save_png(chip,dimg.filename);
resampled_data.images.push_back(dimg);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment