Package org.opencv.photo
Class AlignMTB
java.lang.Object
org.opencv.core.Algorithm
org.opencv.photo.AlignExposures
org.opencv.photo.AlignMTB
This algorithm converts images to median threshold bitmaps (1 for pixels brighter than median
luminance and 0 otherwise) and than aligns the resulting bitmaps using bit operations.
It is invariant to exposure, so exposure values and camera response are not necessary.
In this implementation new image regions are filled with zeros.
For more information see CITE: GW03 .
-
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AlignMTB
__fromPtr__
(long addr) calculateShift
(Mat img0, Mat img1) Calculates shift between two images, i.void
computeBitmaps
(Mat img, Mat tb, Mat eb) Computes median threshold and exclude bitmaps of given image.protected void
finalize()
boolean
getCut()
int
int
void
Short version of process, that doesn't take extra arguments.void
Aligns imagesvoid
setCut
(boolean value) void
setExcludeRange
(int exclude_range) void
setMaxBits
(int max_bits) void
Helper function, that shift Mat filling new regions with zeros.Methods inherited from class org.opencv.core.Algorithm
clear, empty, getDefaultName, getNativeObjAddr, save
-
Constructor Details
-
AlignMTB
protected AlignMTB(long addr)
-
-
Method Details
-
__fromPtr__
-
process
Description copied from class:AlignExposures
Aligns images- Overrides:
process
in classAlignExposures
- Parameters:
src
- vector of input imagesdst
- vector of aligned imagestimes
- vector of exposure time values for each imageresponse
- 256x1 matrix with inverse camera response function for each pixel value, it should have the same number of channels as images.
-
process
Short version of process, that doesn't take extra arguments.- Parameters:
src
- vector of input imagesdst
- vector of aligned images
-
calculateShift
Calculates shift between two images, i. e. how to shift the second image to correspond it with the first.- Parameters:
img0
- first imageimg1
- second image- Returns:
- automatically generated
-
shiftMat
Helper function, that shift Mat filling new regions with zeros.- Parameters:
src
- input imagedst
- result imageshift
- shift value
-
computeBitmaps
Computes median threshold and exclude bitmaps of given image.- Parameters:
img
- input imagetb
- median threshold bitmapeb
- exclude bitmap
-
getMaxBits
public int getMaxBits() -
setMaxBits
public void setMaxBits(int max_bits) -
getExcludeRange
public int getExcludeRange() -
setExcludeRange
public void setExcludeRange(int exclude_range) -
getCut
public boolean getCut() -
setCut
public void setCut(boolean value) -
finalize
- Overrides:
finalize
in classAlignExposures
- Throws:
Throwable
-