IMcPatternMatchingCreateCrossCorrelationImage Method
|
|
Creates cross-correlation image of two sources.
Namespace:
MediaCy.IQL.Align
Assembly:
MediaCy.IQL.Align (in MediaCy.IQL.Align.dll) Version: 10.0.6912.0
SyntaxFunction CreateCrossCorrelationImage (
vImage2 As Object,
Optional Flags As mcImageCreateFlags = mcImageCreateFlags.mcicfDefault,
<OptionalAttribute> vImage1 As Object
) As McImage
Parameters
- vImage2
- Type: SystemObject
- Flags (Optional)
- Type: MediaCy.IQL.EnginemcImageCreateFlags
image creation flags - vImage1 (Optional)
- Type: SystemObject
Return Value
Type:
McImage
RemarksThe method uses the ancestor image or image provided in vTargetImage to perform
cross correlation between vRefImage and TargetImage. The method applies apodization
to images (if DoApodization is TRUE), resizes, if necessary, both images
to the next power of 2, performs Fourier cross-correlation, clips the image
to the original size.
The method produces a floating point image with bright spikes corresponded to best-match positions
of the vRefImage of TargetImage.
The method can be used finding locations of objects, such as cells, characters, etc on images, which
then can be used for following processing.
Note, that the best-match positions can be also obtained using the FindPattern method
without generating a cross-correlation image.
Examples
Dim Im1 As McImage, Ref As McImage
Set Im1 = ActiveImage
ThisApplication.ActiveImage.Aoi.Reset
ThisApplication.ActiveImage.Aoi.SetBox 0, 62, 48, 83, 70
Set Ref = ThisApplication.ActiveImage.Duplicate
Im1.Aoi.Reset
Im1.PatternMatching.CorrelationMethodFFT.DoRotation = False
Im1.PatternMatching.CorrelationMethodFFT.DoScaling = False
Im1.PatternMatching.CorrelationMethodFFT.CorrelationMethod = mcCorrelationFFTPhase
Im1.PatternMatching.CreateCrossCorrelationImage Ref
See Also