001// 002// This file is auto-generated. Please don't modify it! 003// 004package org.opencv.photo; 005 006import java.util.ArrayList; 007import java.util.List; 008import org.opencv.core.Mat; 009import org.opencv.photo.MergeExposures; 010import org.opencv.utils.Converters; 011 012// C++: class MergeMertens 013/** 014 * Pixels are weighted using contrast, saturation and well-exposedness measures, than images are 015 * combined using laplacian pyramids. 016 * 017 * The resulting image weight is constructed as weighted average of contrast, saturation and 018 * well-exposedness measures. 019 * 020 * The resulting image doesn't require tonemapping and can be converted to 8-bit image by multiplying 021 * by 255, but it's recommended to apply gamma correction and/or linear tonemapping. 022 * 023 * For more information see CITE: MK07 . 024 */ 025public class MergeMertens extends MergeExposures { 026 027 protected MergeMertens(long addr) { super(addr); } 028 029 // internal usage only 030 public static MergeMertens __fromPtr__(long addr) { return new MergeMertens(addr); } 031 032 // 033 // C++: void cv::MergeMertens::process(vector_Mat src, Mat& dst, Mat times, Mat response) 034 // 035 036 public void process(List<Mat> src, Mat dst, Mat times, Mat response) { 037 Mat src_mat = Converters.vector_Mat_to_Mat(src); 038 process_0(nativeObj, src_mat.nativeObj, dst.nativeObj, times.nativeObj, response.nativeObj); 039 } 040 041 042 // 043 // C++: void cv::MergeMertens::process(vector_Mat src, Mat& dst) 044 // 045 046 /** 047 * Short version of process, that doesn't take extra arguments. 048 * 049 * @param src vector of input images 050 * @param dst result image 051 */ 052 public void process(List<Mat> src, Mat dst) { 053 Mat src_mat = Converters.vector_Mat_to_Mat(src); 054 process_1(nativeObj, src_mat.nativeObj, dst.nativeObj); 055 } 056 057 058 // 059 // C++: float cv::MergeMertens::getContrastWeight() 060 // 061 062 public float getContrastWeight() { 063 return getContrastWeight_0(nativeObj); 064 } 065 066 067 // 068 // C++: void cv::MergeMertens::setContrastWeight(float contrast_weiht) 069 // 070 071 public void setContrastWeight(float contrast_weiht) { 072 setContrastWeight_0(nativeObj, contrast_weiht); 073 } 074 075 076 // 077 // C++: float cv::MergeMertens::getSaturationWeight() 078 // 079 080 public float getSaturationWeight() { 081 return getSaturationWeight_0(nativeObj); 082 } 083 084 085 // 086 // C++: void cv::MergeMertens::setSaturationWeight(float saturation_weight) 087 // 088 089 public void setSaturationWeight(float saturation_weight) { 090 setSaturationWeight_0(nativeObj, saturation_weight); 091 } 092 093 094 // 095 // C++: float cv::MergeMertens::getExposureWeight() 096 // 097 098 public float getExposureWeight() { 099 return getExposureWeight_0(nativeObj); 100 } 101 102 103 // 104 // C++: void cv::MergeMertens::setExposureWeight(float exposure_weight) 105 // 106 107 public void setExposureWeight(float exposure_weight) { 108 setExposureWeight_0(nativeObj, exposure_weight); 109 } 110 111 112 @Override 113 protected void finalize() throws Throwable { 114 delete(nativeObj); 115 } 116 117 118 119 // C++: void cv::MergeMertens::process(vector_Mat src, Mat& dst, Mat times, Mat response) 120 private static native void process_0(long nativeObj, long src_mat_nativeObj, long dst_nativeObj, long times_nativeObj, long response_nativeObj); 121 122 // C++: void cv::MergeMertens::process(vector_Mat src, Mat& dst) 123 private static native void process_1(long nativeObj, long src_mat_nativeObj, long dst_nativeObj); 124 125 // C++: float cv::MergeMertens::getContrastWeight() 126 private static native float getContrastWeight_0(long nativeObj); 127 128 // C++: void cv::MergeMertens::setContrastWeight(float contrast_weiht) 129 private static native void setContrastWeight_0(long nativeObj, float contrast_weiht); 130 131 // C++: float cv::MergeMertens::getSaturationWeight() 132 private static native float getSaturationWeight_0(long nativeObj); 133 134 // C++: void cv::MergeMertens::setSaturationWeight(float saturation_weight) 135 private static native void setSaturationWeight_0(long nativeObj, float saturation_weight); 136 137 // C++: float cv::MergeMertens::getExposureWeight() 138 private static native float getExposureWeight_0(long nativeObj); 139 140 // C++: void cv::MergeMertens::setExposureWeight(float exposure_weight) 141 private static native void setExposureWeight_0(long nativeObj, float exposure_weight); 142 143 // native support for java finalize() 144 private static native void delete(long nativeObj); 145 146}