91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 6.71MB
    文件類型: .zip
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-11-16
  • 語(yǔ)言: Python
  • 標(biāo)簽: hdr??

資源簡(jiǎn)介

使用OpenCV進(jìn)行高動(dòng)態(tài)范圍(HDR)成像(C ++ / Python)

資源截圖

代碼片段和文件信息

#include?
#include?“opencv2/imgcodecs.hpp“
#include?
#include?
#include?
#include?
using?namespace?cv;
using?namespace?std;


void?readImagesAndTimes(vector?&images?vector?×)
{
??
??int?numImages?=?4;
??
??static?const?float?timesArray[]?=?{1/30.0f0.252.515.0};
??times.assign(timesArray?timesArray?+?numImages);
??
??static?const?char*?filenames[]?=?{“img_0.033.jpg“?“img_0.25.jpg“?“img_2.5.jpg“?“img_15.jpg“};
??for(int?i=0;?i???{
????Mat?im?=?imread(filenames[i]);
????images.push_back(im);
??}

}

int?main(int?char**argv)
{
??//?Read?images?and?exposure?times
??cout?<??vector?images;
??vector?times;
??readImagesAndTimes(images?times);
??
??
??//?Align?input?images
??cout?<??Ptr?alignMTB?=?createAlignMTB();
??alignMTB->process(images?images);
??
??//?Obtain?Camera?Response?Function?(CRF)
??cout?<??Mat?responseDebevec;
??Ptr?calibrateDebevec?=?createCalibrateDebevec();
??calibrateDebevec->process(images?responseDebevec?times);
??
??//?Merge?images?into?an?HDR?linear?image
??cout?<??Mat?hdrDebevec;
??Ptr?mergeDebevec?=?createMergeDebevec();
??mergeDebevec->process(images?hdrDebevec?times?responseDebevec);
??//?Save?HDR?image.
??imwrite(“hdrDebevec.hdr“?hdrDebevec);
??cout?<??
??//?Tonemap?using?Drago‘s?method?to?obtain?24-bit?color?image
??cout?<??Mat?ldrDrago;
??Ptr?tonemapDrago?=?createTonemapDrago(1.0?0.7);
??tonemapDrago->process(hdrDebevec?ldrDrago);
??ldrDrago?=?3?*?ldrDrago;
??imwrite(“l(fā)dr-Drago.jpg“?ldrDrago?*?255);
??cout?<??
??//?Tonemap?using?Durand‘s?method?obtain?24-bit?color?image
??cout?<??Mat?ldrDurand;
??Ptr?tonemapDurand?=?createTonemapDurand(1.541.011);
??tonemapDurand->process(hdrDebevec?ldrDurand);
??ldrDurand?=?3?*?ldrDurand;
??imwrite(“l(fā)dr-Durand.jpg“?ldrDurand?*?255);
??cout?<??
??//?Tonemap?using?Reinhard‘s?method?to?obtain?24-bit?color?image
??cout?<??Mat?ldrReinhard;
??Ptr?tonemapReinhard?=?createTonemapReinhard(1.5?000);
??tonemapReinhard->process(hdrDebevec?ldrReinhard);
??imwrite(“l(fā)dr-Reinhard.jpg“?ldrReinhard?*?255);
??cout?<??
??//?Tonemap?using?Mantiuk‘s?method?to?obtain?24-bit?color?image
??cout?<??Mat?ldrMantiuk;
??Ptr?tonemapMantiuk?=?createTonemapMantiuk(2.20.85?1.2);
??tonemapMantiuk->process(hdrDebevec?ldrMantiuk);
??ldrMantiuk?=?3?*?ldrMantiuk;
??imwrite(“l(fā)dr-Mantiuk.jpg“?ldrMantiuk?*?255);

?屬性????????????大小?????日期????時(shí)間???名稱
-----------?---------??----------?-----??----
?????目錄???????????0??2017-10-08?16:59??hdr\
?????文件????????6148??2017-10-08?16:59??hdr\.DS_Store
?????目錄???????????0??2017-10-08?16:59??__MACOSX\
?????目錄???????????0??2017-10-08?16:59??__MACOSX\hdr\
?????文件?????????120??2017-10-08?16:59??__MACOSX\hdr\._.DS_Store
?????文件????????3076??2017-10-06?09:46??hdr\hdr.cpp
?????文件?????????277??2017-10-06?09:46??__MACOSX\hdr\._hdr.cpp
?????文件????????2405??2017-10-08?16:58??hdr\hdr.py
?????文件?????????226??2017-10-08?16:58??__MACOSX\hdr\._hdr.py
?????文件??????902169??2017-10-06?09:46??hdr\img_0.033.jpg
?????文件?????????226??2017-10-06?09:46??__MACOSX\hdr\._img_0.033.jpg
?????文件?????1462235??2017-10-06?09:46??hdr\img_0.25.jpg
?????文件?????????226??2017-10-06?09:46??__MACOSX\hdr\._img_0.25.jpg
?????文件?????2396332??2017-10-06?09:46??hdr\img_15.jpg
?????文件?????????226??2017-10-06?09:46??__MACOSX\hdr\._img_15.jpg
?????文件?????2354237??2017-10-06?09:46??hdr\img_2.5.jpg
?????文件?????????226??2017-10-06?09:46??__MACOSX\hdr\._img_2.5.jpg
?????文件?????????226??2017-10-08?16:59??__MACOSX\._hdr

評(píng)論

共有 條評(píng)論

相關(guān)資源