ImageAttention method
Feng-GUI attention heatmap analysis of an image.
Credit: one credit is charged for each successful execution.
Arguments
InputImage (string)
URL (http://...) path of the input image file.
ViewType (integer)
The content type of the image.
This parameter is a value from one of the following flags.
|
Name |
Value |
Description |
|
default |
0 |
|
|
photo |
1 |
natural image |
|
website |
2 |
internet website |
|
billboard |
3 |
road billboard |
|
advertisement
|
4 |
advertisement |
ViewDistance (integer)
The viewer's distance from the image.
This parameter is a value from the following group of flags.
|
Name |
Value |
Description |
|
default |
0 |
default is centimeters |
|
centimeters |
1 |
computer, newspaper. |
|
meters |
2 |
A distance image. for example billboard |
AnalysisOptions (integer)
Specifies the sub algorithms used in the analysis. This parameter is a combination
of accumulated flags from the following group of flags.
For example, to include AnalyzeContrast (1) and AnalyzeOrientation (2), set the
AnalysisOptions = 1 + 2 = 3
|
Name |
Value |
Description |
|
Default |
0 |
Default analysis settings.
|
|
AnalyzeContrast |
1 |
Include Contrast analysis (Default True) |
|
AnalyzeOrientation |
2 |
Include Orientation analysis (Default True) |
|
AnalyzeColor |
4 |
Include Color analysis (Default True) |
|
AnalyzeIntensity |
8 |
Include Intensity analysis (Default True) |
|
AnalyzeFlicker |
16 |
Include Flicker analysis |
|
AnalyzeMotion |
32 |
Include Motion analysis |
|
AnalyzeText |
64 |
Add text detection to the analysis |
|
AnalyzeFace |
128 |
Add face detection to the analysis |
|
AnalyzeSkin |
256 |
Add Skin Hue detection to the analysis |
OutputOptions
Specifies how the output heatmap file is generated and its content. This parameter
is a combination of accumulated flags from the following group of flags.
For example, to include MergeHeatmap (1) and DrawHotSpots (2), set the OutputOptions
= 1 + 2 = 3
|
Name |
Value |
Description |
|
Default |
0 |
Default output settings |
|
MergeHeatmap |
1 |
Should the output contain a merged layer of the input image (Default True) |
|
DrawHotSpots |
2 |
Should the heatmap include hotspot circles. (Default False) |
|
DrawGaze |
4 |
Should the heatmap include gaze lines between hotspot. (Default True) |
|
DrawLegend |
8 |
Should the heatmap include a map legend watermark. (Default True) |
|
DrawGazeOrder |
16 |
Should the heatmap include the gaze order number. (Default True) |
Example Request
<?xml version="1.0"?>
<methodCall>
<methodName>ImageAttention</methodName>
<params>
<!-- InputImage -->
<param><value><string>http://www.feng-gui.com/images/alon512.png</string>
</value></param>
<!-- ViewType -->
<param><value><int>0</int></value></param>
<!-- ViewDistance -->
<param><value><int>0</int></value></param>
<!-- AnalysisOptions -->
<param><value><int>3</int></value></param>
<!-- OutputOptions -->
<param><value><int>15</int></value></param>
</params>
</methodCall>
Example Response
The method returns a HeatmapInfo struct.
HeatmapInfo struct
ServiceVersion
Service version.
Version
Attention heatmap version.
InputImage
URL location of the input image file.
OutputImage
URL location of the heatmap file.
The image is not persisted and deleted, within one hour, from
this location.
OutputAttentionImage
URL location of the grayscale attention file.
Hotspots
Array of Hotspots points (named FGPoint)
FGPoint
Point location (x,y) within the return image.
<?xml version="1.0"?>
<methodResponse>
<params>
<param>
<value>
<struct>
<member>
<name>HeatmapInfo.ServiceVersion</name>
<value><string>" + FENG_GUI_SERVICE_VERSION + "</string></value>
</member>
<member>
<name>HeatmapInfo.Version</name>
<value><string>" + FENG_GUI_HEATMAP_VERSION + "</string></value>
</member>
<member>
<name>HeatmapInfo.InputImage</name>
<value><string>http://www.feng-gui.com/images/alon512.png</string></value>
</member>
<member>
<name>HeatmapInfo.OutputImage</name>
<value><string>http://service.feng-gui.com/users/user_id/files/heatmap/OutputFile.png</string>
</value>
</member>
<member>
<name>HeatmapInfo.OutputAttentionImage</name>
<value><string>http://service.feng-gui.com/users/user_id/files/heatmap/OutputAttentionFile.png</string>
</value>
</member>
<member>
<name>HeatmapInfo.Hotspots</name>
<value>
<array>
<data>
<value>
<struct>
<member>
<name>FGPoint.x</name>
<value><int>10</int></value>
</member>
<member>
<name>FGPoint.y</name>
<value><int>10</int></value>
</member>
</struct>
</value>
...
<value>
<struct>
<member>
<name>FGPoint.x</name>
<value><int>10</int></value>
</member>
<member>
<name>FGPoint.y</name>
<value><int>10</int></value>
</member>
</struct>
</value>
</data>
</array>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodResponse>