B should be the median value of surrounding pixels
So, we can already quickly create an expression in PixMath like the following
ImgMed=med($T)
Wouldn't it be nice to be able to create the following
AnnulusMed=AMed($T)
where AnnulusMed (only selected as an example; AnnMax, AnnMin, AnnAvg, AnnSD, etc. might also be immediately accessible) is calculated 'on the fly' for every pixel in the target image, in this case being the Median value of either the 'centre', the 'ring' or the 'outside' of an annular area, centred on the current pixel, as the PCL core scans all pixels in an image.
Similar approaches could be made using the notion of 'square' or 'circular' target areas which, like the Annular target area described above, could have user-defined pixel dimensions.
I see this as a way of quickly obtaining some statistical value that is applicable to a SPECIFIC PIXEL, based on those pixels surrounding this target pixel.
Having this type of data available, easily, in PixMath, would allow for the ingenious types of pixel substitution that we are looking for, the final substitution also being controlled either by an overall external Mask, or by judicious use of IIF(a,b,c) statements.
Not being next to my PI computer, can anyone confirm whether a PixMath 'Expression' can be of the form
PV_TopRight_Bu = pix(x-1,y+1,2)
where x and y do not have to be defined by way of any 'For-Next' loop statements, as PixMath already 'scans' an image, for all pixels of all rows, and all columns and all colour planes
where the '2' in the pix(x,y,c) statement refers to the 'Blue' channel
and where PV_TopRight_Bu will be assigned the image pixel value of the pixel that is one row above, and one column to the right of the current pixel, in the Blue colour channel
If this IS possible, then presumably further expressions could be created for the 'other' surrounding pixels, leading to the ability to calculate either the Mean or Median of these surrounding pixels - obviously providing a means of permitting 'intelligent' pixel substitution by way of a set of pre-defined, 'loadable' PixMath process icons (all of which were fundamentally image-independent)
If THAT sort approach is 'do-able', then huge 'power' can be given to a user - without the complication of immersing them in the details of PJSR, etc.
Cheers,