Skip to content

Commit

Permalink
fix image contrast in DICe_TrackingMovieMaker
Browse files Browse the repository at this point in the history
  • Loading branch information
dicengine committed Aug 23, 2019
1 parent 7e1c081 commit e5e03ed
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/utils/src/DICe_ImageIO.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,7 @@ DICE_LIB_DLL_EXPORT
cv::Mat read_image(const char * file_name){
Teuchos::RCP<Teuchos::ParameterList> params = Teuchos::rcp(new Teuchos::ParameterList());
if(image_file_type(file_name)==CINE){
params->set(spread_intensity_histogram,true);
//params->set(spread_intensity_histogram,true);
params->set(filter_failed_cine_pixels,true);
params->set(convert_cine_to_8_bit,true);
}
Expand Down
9 changes: 1 addition & 8 deletions tools/DICe_TrackingMovieMaker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,14 +269,7 @@ int main(int argc, char *argv[]) {
std::stringstream cine_ss;
cine_ss << trimmed_cine_name << "_" << frame << ".cine";
DEBUG_MSG("Loading cine image " << cine_ss.str());
DICe::Image img(cine_ss.str().c_str());
// convert the image to an opencv mat:
Mat mat_img(img.height(),img.width(), CV_8UC1);
for(int_t y=0;y<img.height();++y){
for(int_t x=0;x<img.width();++x){
mat_img.at<uchar>(y,x) = std::floor(img(x,y));
}
}
Mat mat_img = utils::read_image(cine_ss.str().c_str());
Mat out_img(mat_img.size(), CV_8UC3);
cvtColor(mat_img, out_img, cv::COLOR_GRAY2RGB);

Expand Down

0 comments on commit e5e03ed

Please sign in to comment.