WhiteBalance¶
- class controllers.WhiteBalance¶
Bases:
handleWHITEBALANCE - Controller for the White Balance correction dialog.
Corrects white balance of RGB images using MATLAB’s
chromadaptfunction. The white point can be detected from selection/mask areas, or specified manually.Launch as GUI tool:
obj.mibController.startController('controllers.WhiteBalance');Launch in batch mode:
BatchOpt.PickedRegion = {'ManualValue'}; BatchOpt.ManualWhiteColor = '200 190 180'; obj.mibController.startController('controllers.WhiteBalance', [], BatchOpt);Trigger return of possible options:
obj.mibController.startController('controllers.WhiteBalance', [], NaN);- Constructor Summary
- WhiteBalance(mibModel, varargin)¶
WHITEBALANCE - Constructor.
- Syntax:
obj = WhiteBalance(mibModel) obj = WhiteBalance(mibModel, [], BatchOpt)
- Property Summary
- BatchOpt¶
cell array of listener handles
- listener¶
handle to main MIB figure (used as parent for dialogs)
- mibGUI¶
handle to the view (views.WhiteBalanceGUI)
- mibModel¶
- view¶
handle to MibModel
- Method Summary
- static ViewListner_Callback2(~, evnt)¶
VIEWLISTNER_CALLBACK2 - Static listener guard; safe even when view is invalid.
- addCallbacks()¶
ADDCALLBACKS - Wire all widget callbacks after view creation.
- closeWindow()¶
CLOSEWINDOW - Destroy view and fire CloseEvent.
- correctWhiteBalance(mode, batchModeSwitch)¶
CORRECTWHITEBALANCE - Apply white balance correction to the image.
- Parameters:¶
* (
**batchModeSwitch**)all' (
'Correct)*
Default (
skips undo backup.) –false.
- detectWhiteFromLayer()¶
DETECTWHITEFROMLAYER - Sample mean RGB from current mask/selection layer and populate ManualWhiteColor; switch PickedRegion to ManualValue.
- figureKeyPress(event)¶
FIGUREKEYPRESS - Forward key presses to MIB main window shortcuts.
- helpButton_Callback()¶
HELPBUTTON_CALLBACK - Open documentation in browser.
- manualWhiteColorValueChanged(event)¶
MANUALWHITECOLORVALUECHANGED - Validate that ManualWhiteColor contains 3 numeric values.
- pickedRegionSelectionChanged(event)¶
PICKEDREGIONSELECTIONCHANGED - Update BatchOpt and toggle ManualWhiteColor enable state.
- returnBatchOpt(BatchOptOut)¶
RETURNBATCHOPT - Send BatchOpt to mibBatchController.
- updateBatchOptFromGUI(event)¶
UPDATEBATCHOPTFROMGUI - Sync BatchOpt from a widget change event.
- updateWidgets()¶
UPDATEWIDGETS - Refresh widgets to reflect current model state.