Click or drag to resize

BasePluginCamera Methods

The BasePluginCamera type exposes the following members.

Methods
 NameDescription
Public methodStatic memberAdjustBrightnessContrast Adjusts brightness and contrast of the given source image according to the given brightness and contrast values.
Public methodStatic memberAdjustNumberOfChannels Converts the number of channels of sourceMat to the wanted number of channels.
Public methodStatic memberCalcCenteredPicturePositionInCanvas Given are two rectangles, representing a (bigger) canvas and a (smaller) picture; the last one has to be put centered into the canvas and needs to be scaled to fit into the canvas, but without changing its aspect ratio.
Public methodCalcInterpolatedCenterOffsetCorrection During camera calibration we create a set of RectificationData objects (8 or 16, dependent on quadratic or cubic interpolation) at some positions in the scan field. For other positions we need interpolated ones.
Public methodCalcReducedWidthHeightAndOffsets Calculates to the wanted width and height valid width, height and offset values fulfilling the conditions the camera's hardware demands when reducing its image size (e. g. width must be a multiple of 16 or something like that). If the image size is reduced, offsets are calculated to have the effective image in the center.
Public methodCheckCuttingSize Checks if the given size is less than the camera's hardware sensor size.
Public methodCheckOnChangedScanHeadParameters Checks if some scan head parameters has changed after the camera has been calibrated. A re-calibration is necessary when the scan head, its correction file or the scan field size has changed.
Public methodClearScanFieldImage Creates a new scan field image Mat object and fills it with empty pixels.
Public methodConnect Connects to the device.
(Inherited from BaseDeviceController)
Public methodStatic memberConvertDmat4ToEmguMat Converts a dmat4 4x4 matrix object into an Emgu 2x3 Mat object.
Public methodStatic memberConvertMatToSKBitmap Converts the given Mat object into a SKBitmap.
Public methodConvertPixelLengthToWorldLength(Double) Converts a distance, given in pixel coordinates, into the same distance in world coordinates. The downscale factor is taken into account.
Public methodConvertPixelLengthToWorldLength(dvec2) 
Public methodConvertPixelPosToWorldPos Inversion method of ConvertWorldPosToPixelPos().
Public methodConvertScanFieldPixelToWorld converts scan field pixel point to the scan field or world coordinates (µm) pixel coordinate system: left top 0/0 right bottom w/h
Public methodConvertScanFieldWorldToPixel converts scan field or world coordinates to pixel
Public methodConvertWorldLengthToPixelLength Converts a distance, given in world coordinates, into the same distance in pixel coordinates. The downscale factor is taken into account.
Public methodConvertWorldPosToPixelPos Converts a point in world coordinates into pixel coordinates. The current size in world coordinates and the current pixel size of the scan field is taken into account. The origin in world coordinates is expected to be in the middle of the field. Attention: Field and process transformations are not considered.
Public methodConvertWorldToPixel(dvec2) same functionality as the one above, just using the DownscalFactor from the camera
Public methodConvertWorldToPixel(dvec2, Double) Converts a point in world coordinates into pixel coordinates using the field sizes in world and pixel coordinates and the downscale factor. In difference to ConvertWorldPosToPixelPos() the origin in world coordinates is not expected to be in the center of the field. The origin of the pixel coordinates is expected to be in the upper left corner.
Public methodConvertWorldToPixel(dvec3, Double) 
Public methodStatic memberCreateAllowedRanges When doing the rectification calibration the expected crosses are at the position ratios (0.1; 0.1), (0.9; 0.1), (0.5; 0.5), (0.1, 0.9) and (0.9; 0.9). To detect if a found cross is valid the deviation to these expected positions must not be too big. These allowed deviations are defined here by the value allowedRatioDelta. For example, a cross at position (0.02, 0.18) may be an accaptable result for the upper left cross.
Public methodStatic memberCreateBitmapSourceFromMat Converts a Mat object into a BitmapSource object.
Protected methodCreateDownscaledTakenPicture Creates a downscaled, three channel Mat object from the given, one channel takenPictureMat and adds a red cross hair if wanted.
Public methodStatic memberCropMatCenter Returns a cutting of the given srcMat from its center with the given width and height.
Public methodCropPicture Crops the given srcMat according to the rectification crop factor, needed to avoid black artifact stripes caused by the rectification on F-Theta lens systems.
Public methodCutRegionMat Creates a cutting of the taken scan field image based on the given center point and the given size.
Public methodDisconnect Disconnects from the device.
(Inherited from BaseDeviceController)
Public methodDispose
(Inherited from BasePlugin)
Protected methodDispose(Boolean) Stops the streaming and disconnects the camera.
(Overrides BaseDeviceControllerDispose(Boolean))
Public methodDisposeUI Disposes the given setting view.
(Inherited from BaseDeviceController)
Protected methodDoDisposeUI
(Inherited from BasePlugin)
Protected methodDoShowUI Shows the specific UI embedded in the plug-in instance. The content will be wrapped by a preset view.
(Inherited from BasePlugin)
Protected methodDoShowUICallback Invokes the callback that can be used when the DoShowUI method is done.
(Inherited from BasePlugin)
Public methodStatic memberEnlargeMat Enlarges the given Mat object by the given percentage of its width and height. Example: If the width is 200 pixel and percentage is 10, the width of the new Mat object is 220 pixels. The source Mat is put centered into the new Mat object, and the empty regions are filled with the border pixels.
Public methodFieldImageCenterInPixel return the real center point of Image rect in pixel
Public methodStatic memberGetByteMatElement 
Public methodGetDeviceStatusRepresentation Returns the color and description of device state. Useful for UI purpose.
(Inherited from BaseDeviceController)
Public methodGetFieldAndProcessTrafo 
Public methodGetFieldSizePixel Size of one camera image
Public methodStatic memberGetFloatMatElement Gets the value at position row and col in the given float mat object.
Public methodGetLastScanHeadPositionFieldRectPixel 
Public methodStatic memberGetMatElement Gets the value at position row and col in the given double mat object.
Public methodGetRectificationCalibrationTilePositions Creates a list of 9 points being the positions of the center of the tiles that are used during the rectification calibration.
Public methodGetRegionInPixel Rectangle in image pixel + rotation for RegionOfInterest
Public methodGetRegionMat Image of RegionOfInterest
Public methodGetScanFieldSizePixel Gets the field size in pixels with respect to the downscale factor the user has set.
Public methodGetScanHeadPositionFieldRectPixel 
Public methodGetUsedScanController 
Public methodHandleCombinePixelsChanges Handles wanted binning changes in the camera settings by writing the values to the hardware only if needed.
Public methodHandleExternalDeviceRequestAsync Handles a chained request for a given list of features.
(Inherited from BaseDeviceController)
Public methodInitialize Plug-in specific initialization can be done here if necessary.
(Inherited from BasePlugin)
Public methodInitializeCalibrationDataSet Initializes the calibration data set based on the scan head's configuration file. If there are no entries in the dictionary, two entries are created with the top and bottom z-values. Otherwise the min and max focus levels are read from the dictionary's min and max levels. The remaining data must be filled later with the calibration data.
Public methodInterpolateCalibrations Interpolates to a given z value between the two nearest calibration sets. The dictionary _calibrationDataSet contains an arbitrary number of calibrations (at least one), each calibrated at a specific z value. To get the calibration at an arbitrary z value, the nearest two calibrations are searched and all calibration data is interpolated between these two according to the arbitrary z value.
Public methodStatic memberInterpolateFromNPoints Calculates a value y to the given value x by performing a polynomial interpolation between the given points. In case of four points a cubic interpolation is done: y = f(x) = a*x^3 + b*x^2 + c*x + d.
Public methodInterruptStreaming 
Protected methodInvokeConnected Invokes Connected event.
(Inherited from BaseDeviceController)
Protected methodInvokeDeviceUIRequested Callback method to show the nested scan head settings dialog.
(Inherited from BaseCamera)
Protected methodInvokeDisconnected Invokes Disconnected event.
(Inherited from BaseDeviceController)
Protected methodInvokeInitialized Invokes Initialized event.
(Inherited from BaseDeviceController)
Protected methodInvokeStatusChanged Invokes StatusChanged event.
(Inherited from BaseDeviceController)
Public methodLoadCalibration Loads the properties building the calibration data.
Protected methodOnDevicesChanged
(Inherited from BaseDeviceController)
Public methodPutIntoMat Puts a smaller inMat object into a bigger outMat object at the given point. In case of picking, centerWorldPoint is the position where the user has clicked into the workspace, without any transformations. To get the pixel position where inMat has to be put, the center offset and other transformations must be applied, before the point is transformed from world into pixel coordinates. Because of the center offset the given point is *not* the center of inMat. This method is also used when taking pictures of a ROI. In this case the given point should be the center of the inMat. Therefore the given point must be adjusted by the center offset before to compensate the transformation.
Public methodStatic memberPutMatIntoMat Puts a small source picture at the given xy position into a larger destination picture; the origin is the upper left corner of the destination picture, and the xy position is the upper left corner of the source where it will be placed. If an out of bounds situation occurs, the source image is clipped to fit into the destination.
(0,0)
    +----------------------------+
    |                   dest     |
    |   (x,y)                    |
    |       +------+             |
    |       |source|             |
    |       +------+         +---+--+  out of bounds:
    |                        |   |  |  source will be clipped
    |                        +---+--+  to fit into dest
    |                            |
    +----------------------------+
                                 (width-1, height-1)
Public methodStatic memberPutPictureCenteredInCanvas Given are two Mat objects, representing a (bigger) canvas and a (smaller) picture; the last one has to be put centered into the canvas and needs to be scaled to fit into the canvas, but without changing its aspect ratio.
Public methodRectify Rectifies the image in srcMat according to its center point in the workspace. The rectification data points are interpolated first according to the center point.
Public methodResetCameraFieldSize Resets the image size to the maximal value, defined by the camera's physical sensor size.
Public methodResetCameraSettings Resets all parameters to the ones stored in the temporary properties. See comment in StoreCurrentCameraSettings() for details.
Public methodStatic memberRotateMat Rotates a Mat object without clipping the edges. See https://stackoverflow.com/questions/22041699/rotate-an-image-without-cropping-in-opencv-in-c.
Public methodStatic memberRotateStep90 Performs an in place rotation in 90° steps of the given picture.
Public methodSaveCalibration Saves the properties building the calibration data.
Public methodSetCameraFieldSize Sets the camera's field width and height (in pixel). Can be overloaded to set it in the camera's real hardware.
Protected methodSetCurrentParameterValuesOnCamera Sets the camera parameters in the hardware according to the current parameters in this camera object.
Public methodSetExposureTime Sets the camera's exposure time. Can be overloaded to set it in the camera's real hardware.
Protected methodSetExposureTimeOnCamera 
Public methodSetFieldTrafoScaleAndRotation 
Public methodSetGain Sets the camera's gain. Can be overloaded to set it in the camera's real hardware.
Protected methodSetGainOnCamera 
Public methodSetIsAutoBrightness Sets whether the gain and exposure time should be set automatically by the camera.
Protected methodSetIsAutoBrightnessOnCamera 
Public methodSetIsAutoExposure Sets whether the exposure time should be set automatically by the camera.
Protected methodSetIsAutoExposureOnCamera 
Public methodSetIsAutoGain Sets whether the gain should be set automatically by the camera.
Protected methodSetIsAutoGainOnCamera 
Public methodSetIsCombinePixels Sets whether pixels should be combined.
Protected methodSetIsCombinePixelsOnCamera Sets whether pixels should be combined. Can be overloaded to set it in the camera's real hardware.
Public methodStatic memberSetMatElement(Mat, Int32, Int32, Byte) 
Public methodStatic memberSetMatElement(Mat, Int32, Int32, Double) Sets in the given Mat object the element at the given row and column to the given double value.
Public methodSetRectificationCropFactor Sets the crop factor needed in case of F-Theta lens systems to reduce the tile size. Must be virtual to have access to the settings dialog for updating the value there.
Public methodSetStandardMeasure Sets the standard measure in the camera's settings dialog. Must be virtual to have access to the settings dialog for updating the value there.
Public methodShowUI Shows the specific UI embedded in the plugin instance.
(Inherited from BaseDeviceController)
Public methodShowUICallback Invokes the callback that can be used when the ShowUI method is done.
(Inherited from BaseDeviceController)
Public methodShowUICancelCallback Invokes the callback that can be used when the ShowUI method is done and the user pressed the cancel button
(Inherited from BasePlugin)
Public methodStartStreaming Starts streaming of video data.
Public methodStopStreaming Stops streaming of video data.
Protected methodStoreCurrentCameraSettings Stores all current camera settings in the temporary properties. This is needed to allow the cancel button in the settings dialog to work: When the dialog is opened all current settings are stored here. The user can now change all parameters as he wants it, and they can be used immediately internally e. g. for the calibration process (using the possibly changed StandardMeasure e. g.). If the dialog is canceled afterwards all parameters can be restored from temporary values.
Public methodTakePicture(Boolean, Boolean, Double, Int32, Double) Takes a picture with the camera and downscales it if demanded. The default color (red) is used for the cross hairs.
Public methodTakePicture(Boolean, Boolean, Double, Int32, Color, Double) Takes a picture with the camera and downscales it if demanded.
Public methodTakePictureAndPutItIntoScanFieldImage Takes a picture at the given position and puts it into the untransformed ScanFieldImage at the correct place.
Public methodTakePictureMat Takes a picture from the running video stream and does the downscaling.
Public methodToString
(Inherited from BasePlugin)
Public methodTransformScanFieldImage Transforms the camera's ScanFieldImage according to the current FieldTrafo and ProcessTrafo by applying the inverses.
Public methodTransformWorldPosAndConvertToPixelPos Transforms the given point (in world coordinates) according to the field and process trafo, subtracts the center offset if demanded and converts it to the same point in pixel coordinates of the big scan field image.
Protected methodUpdateFieldSizeProperties 
Top
See Also