![]() ![]() The average intensity value of the image within the mask area is subsequently calculated: hr := F_VN_ImageAverageExp(ipImageWork, aAverage, ipImageMask, hr) įAverageIntensityInCircle := aAverage ![]() Hr := F_VN_DrawCircle(nWidth/2, nHeight/2, MIN(nWidth, nHeight)/2, ipImageMask, aColorWhite, -1, hr) ![]() Hr := F_VN_SetPixels(ipImageMask, aColorBlack, hr) Hr := F_VN_CreateImage(ipImageMask, nWidth, nHeight, TCVN_ET_USINT, 1, hr) Hr := F_VN_GetImageHeight(ipImageWork, nHeight, hr) Sampleīy way of example, a mask is created for the image ipImageWork that says that only a circular area of the image is to be considered: hr := F_VN_GetImageWidth(ipImageWork, nWidth, hr) When applying this mask, the pixels in the corner of an associated image have no further influence on a subsequent operation. However, cases are also conceivable in which the degree of consideration can be set with a finer granularity.Ī mask that restricts the observation area to a circular area in the image can look like this, for example: Binarily, it is frequently the case that all pixels with a value of 0 are interpreted as not to be considered and all pixels with a different value (>=1) are interpreted as to be considered. The interpretation of the intensities can in principle deviate from function to function. The intensities of the mask grayscale image describe which pixels are to be considered. The mask is displayed by a further image with the same shape and size on which the areas (pixels) to be taken into account are marked differently. If shapes other than rectangles are to be defined during image operations, this can be implemented by means of a mask. Without further action, images are limited to a rectangular shape. The intensities of the mask image define which pixels of the associated image are to be taken into account for certain work steps. The mask image has the same size and consists of a grayscale channel. In relation to image processing, a mask means a mask image that belongs to another image. This chapter describes the meaning of masks in TwinCAT Vision. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |