I exported a template to convert a RGB image to HSV using image analysis. (rtf.xml file)
<RasterFunctionTemplate xsi:type='typens:RasterFunctionTemplate' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xmlns:xs='http://www.w3.org/2001/XMLSchema' xmlns:typens='http://www.esri.com/schemas/ArcGIS/10.5'><Name>Raster Function Template</Name><Description>A raster function template.</Description><Function xsi:type='typens:ColorspaceConversionFunction'><Name>Color Model Conversion Function</Name><Description>Converts between color models, for example RGB to HSV.</Description><PixelType>U8</PixelType></Function><Arguments xsi:type='typens:ColorspaceConversionFunctionArguments'><Names xsi:type='typens:ArrayOfString'><String>Raster</String><String>ConversionType</String></Names><Values xsi:type='typens:ArrayOfAnyType'><AnyType xsi:type='typens:RasterFunctionVariable'><Name>Raster</Name><Description></Description><Value></Value><IsDataset>true</IsDataset></AnyType><AnyType xsi:type='typens:RasterFunctionVariable'><Name>ConversionType_2017519_102915_628</Name><Description></Description><Value xsi:type='xs:int'>0</Value><IsDataset>false</IsDataset></AnyType></Values></Arguments><Help></Help><Type>0</Type><Thumbnail></Thumbnail><Definition></Definition><Group></Group><Tag></Tag><ThumbnailEx></ThumbnailEx></RasterFunctionTemplate>
When I try to use the tool "Edit raster function" and use this rtf.xml file the input is not correctly transformed, looks like it only uses one band.
This is the output, using the "Edit Raster Function" tool.
And this is the correct output, using "Image Analysis" tool, with the "Color Model Conversion Function" (RGB to HSV)
Any help appriciated! Original image attached.
I dont think your rtf.xml is wrong or does something wrong. To me it looks as if this is solely a Symbology/Stretchung/Gamma stretch issue caused by defaults you have set. If I copy your code and use, I get excactly what you describe as wanted. The stretch type is percent clip (0.5, 0.5) and the Gamma Stretch used is similar on all bands - 1.31305
If I manually change the Stretch to "none" and remove the gamma stretch, the result is excactly the "blueish" image you show above.
A note on stretch behaviour in ArcGIS/ArcMap: In the ArcMap Options /Raster Tab/Raster Layer Tab you can overwrite the default Stretch behaviour of ArcGIS. Check if you have done so. Without overriding it, the behaviour of ArcGIS is largely controlled by the type of Raster: Go to catalog view and right-click your DGI image, choose properties. There you'll see your image is from Source Type "Generic". There are other source types. See this help chapter to find out what this means for ArcGIS behaviour. "Generic" uses application defaults - and should work just fine and produce what you want - unless you changed something. If you set your image to "Processed" you could expect the (for you wrong=blueish) behaviour you experinced. Feel free to ask if this is not clear. Regards Guenter