Lynkeos  1.2
Instance Methods | Private Attributes | List of all members
MyImageAligner Class Reference

Concrete MyListProcessing dedicated to image alignment. More...

#import <MyListProcessing.h>

Inheritance diagram for MyImageAligner:
Inheritance graph
[legend]

Instance Methods

(oneway void) - alignWithList:reference:refBuffer:lock:darkFrame:flatField:rectangle:cutOff:precisionThreshold:
 Start to align images in a list. More...
 
- Instance Methods inherited from MyListProcessing
(oneway void) - stopProcessing
 

Private Attributes

NSLock * _refSpectrumLock
 
MyImageListItem_referenceItem
 
FFT_DATA_referenceSpectrum
 
FFT_DATA _bufferSpectrum
 
MyIntegerPoint _referenceOrigin
 
u_short _side
 
u_short _cutoff
 
u_short _precisionThreshold
 
BOOL _refSpectrumAvailable
 

Additional Inherited Members

- Class Methods inherited from MyListProcessing
(void) + threadWithAttributes:
 Thread creation. More...
 
- Protected Attributes inherited from MyListProcessing
MyIntegerRect _cropRectangle
 
id _delegate
 
NSEnumerator_list
 
RGB_darkFrame
 
RGB_flatField
 
bool _processEnded
 
NSData * _result
 

Detailed Description

Concrete MyListProcessing dedicated to image alignment.

Method Documentation

◆ alignWithList:reference:refBuffer:lock:darkFrame:flatField:rectangle:cutOff:precisionThreshold:()

- (oneway void) alignWithList: (NSData*)  list
reference: (NSData*)  refItem
refBuffer: (NSData*)  refSpectrum
lock: (NSData*)  lock
darkFrame: (NSData*)  dark
flatField: (NSData*)  flat
rectangle: (MyIntegerRect rect
cutOff: (double)  cutoff
precisionThreshold: (double)  threshold 

Start to align images in a list.

Parameters
listAn enumerator on the list of images to align
refItemThe reference image against which other images are aligned
darkThe stacked dark frames
flatThe stacked flat fields
rectThe default square in which alignment is searched (some images can have the square placed elsewhere).
cutoffThe frequency above which the spectrum is cleared to avoid spurious alignment on some systematic noise).
thresholdThe threshold on the correlation peak standard deviation (above it, the alignment is considered failed).

The reference item spectrum is computed and stored. After return from this method, the processing starts. For each selected item given by the enumerator, its spectrum is computed and used to correlate against the reference.

The image data has the dark frame substracted from it, and is then

divided by the flat field, before Fourier transform.

The correlation peak is the alignment offset which is sent back to the calling thread by means of the processDidProgress delegate.

References _bufferSpectrum, MyListProcessing::_cropRectangle, _cutoff, MyListProcessing::_darkFrame, MyListProcessing::_delegate, MyListProcessing::_flatField, _precisionThreshold, _referenceItem, _referenceOrigin, _referenceSpectrum, _refSpectrumAvailable, _refSpectrumLock, _side, allocate_spectrum(), cutoffSpectrum(), FOR_DIRECT, FOR_INVERSE, fourier(), getImageSample(), MyIntegerRect::origin, MyImageListItem::searchSquareOrigin, MyIntegerRect::size, FFT_DATA::spectrum, and MyIntegerSize::width.

Member Data Documentation

◆ _bufferSpectrum

- (FFT_DATA) _bufferSpectrum
private

◆ _cutoff

- (u_short) _cutoff
private

◆ _precisionThreshold

- (u_short) _precisionThreshold
private

◆ _referenceItem

- (MyImageListItem*) _referenceItem
private

◆ _referenceOrigin

- (MyIntegerPoint) _referenceOrigin
private

◆ _referenceSpectrum

- (FFT_DATA*) _referenceSpectrum
private

◆ _refSpectrumAvailable

- (BOOL) _refSpectrumAvailable
private

◆ _refSpectrumLock

- (NSLock*) _refSpectrumLock
private

◆ _side

- (u_short) _side
private

The documentation for this class was generated from the following files: