User Tools

Site Tools


http_api |

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
http_api [2024/02/27 15:58]
anthony [Overlay]
http_api [2024/04/05 15:35] (current)
anthony [Overlay]
Line 834: Line 834:
 zoom_wide_std zoom_wide_std
 zoom_wide_var ​ p (0 (Low) .. 7 (High)) zoom_wide_var ​ p (0 (Low) .. 7 (High))
 +
 +</​code>​
 +
 +Tau2 Specific
 +
 +<code python>
 +The Color are done in the FPGA:
 +
 +OFF:
 +SetColorPallette+off
 +
 +RESET:
 +SetColorPallette+reset
 +
 +COLORS:
 +SetColorPallette+blackhot
 +SetColorPallette+whitehot
 +SetColorPallette+sepia
 +SetColorPallette+rainbow
 +SetColorPallette+rain
 +SetColorPallette+ironbow2
 +SetColorPallette+ironbow1
 +SetColorPallette+icefire
 +SetColorPallette+glowbow
 +SetColorPallette+fusion
 +SetColorPallette+color2
 +SetColorPallette+color1
  
 </​code>​ </​code>​
Line 852: Line 879:
  
 ---- ----
 +
  
 ==== ClearHistory ==== ==== ClearHistory ====
Line 1612: Line 1640:
 ---- ----
  
-Add/​Update ​the overlay values in the Database.+Display text or a PNG overlayed on the video feed for a given Channel.
  
 == Parameters: == == Parameters: ==
Line 1620: Line 1648:
 //​**chn**// ​ Get the encoder channel number. The default is encoder channel 1. Select between encoder channels. Possible values: 1, 2, 3, or 4. //​**chn**// ​ Get the encoder channel number. The default is encoder channel 1. Select between encoder channels. Possible values: 1, 2, 3, or 4.
  
-**//​rgn_idx//​** ​ Index to map overlay. The region index value can be in the range of 1 to 16. Ambarella provides 16 total color look-up tables for Overlay, rgn_idx signifies which color look-up table is in use. +**//rgn_idx // **//​(Ambarella Specific)// Region ​Index, index to map overlay. The region index value is system-wide and can be in the range of 1 to 16. Ambarella provides 16 total color look-up tables for Overlay ​(for all Channels), rgn_idx signifies which color look-up table(CLUT) ​is in use
 +<​code>​ 
 + TEXT type=text source=”Channel 1” instance=1 rgn_idx=1 
 +      type=text source=”Channel 2” instance=2 rgn_idx=1 
 + 
 +</​code>​ 
 + 
 +In the above example, identical region indices are used, effectively reusing the CLUT. The text will be correct on each channel. When changing the color of the text, when using identical region indices, the last Overlay command issued will override all Overlay instances that are using the same region index, the text will still be different but the color will be the same because they are using the same shared rgn_idx. 
 + 
 +<​code>​ 
 + PNG type=png source=”/​opt/​config/​images/​image.png” instance=1 rgn_idx=2 
 +     ​type=png source=”/​opt/​config/​images/​image.png” instance=2 rgn_idx=2 
 + 
 +</​code>​ 
 + 
 +PNG overlay will work in the same way as text overlay when re-using region indices, but this is only helpful when overlaying identical PNGs.\\ 
 +Using different PNGs would cause colors to go wonky due to differing CLUTs for the different PNGs. 
 + 
 +The encoder writes the entire CLUT at the rgn_idx with each overlay command. 
 + 
 +//**rgn_idx ** (//Qualcomm and DCK//)// Index to map overlay. The region index value can be in the range of 0 to 128, per channel.
  
 //​**​type**// ​ Type of overlay to be used possible values: text or png. //​**​type**// ​ Type of overlay to be used possible values: text or png.
Line 1630: Line 1678:
 //​**char_size**// ​ For text overlay this is the character size. Possible values: 16,32,64, 128. //​**char_size**// ​ For text overlay this is the character size. Possible values: 16,32,64, 128.
  
-//​**layer**// ​ This will set the layer for the overly higher numbers and will overlay over lower numbers if overlapping. The range of layer values are 0 to 7. +//​**layer**// ​ This will set the layer for the overly higher numbers and will overlay over lower numbers if overlapping. The range of layer values are 0 to 7.
  
 **//​text_color//​** ​ Text color, which is in RGB values with Alpha **//​text_color//​** ​ Text color, which is in RGB values with Alpha
Line 1638: Line 1686:
 //​**outline_enable**// ​ Whether outline is enabled or disabled. Possible values: on, off //​**outline_enable**// ​ Whether outline is enabled or disabled. Possible values: on, off
  
-//​**outline_stroke **//  The width of the outline stroke is in the range of 1, 2 and 4. +//​**outline_stroke **//  The width of the outline stroke is in the range of 1, 2 and 4. If the font sizes value are less than 64 then outline stroke value as 1, if the font size value is equal to 64 then outline stroke value is 2 and if the font size value is more than 64 then outline stroke value is 4.
-If the font sizes value are less than 64 then outline stroke value as 1,  +
-if the font size value is equal to 64 then outline stroke value is 2 and +
-if the font size value is more than 64 then outline stroke value is 4.  +
 == Returns: == == Returns: ==
  
Line 1655: Line 1699:
 ---- ----
  
-=== Command to execute: ​ ===+=== Command to execute: ===
  
 <​code>​ <​code>​
 python3 z3overlay.py -ip 192.168.10.127 -username admin -passwd admin -aim -track -moon -rtsp python3 z3overlay.py -ip 192.168.10.127 -username admin -passwd admin -aim -track -moon -rtsp
 +
 </​code>​ </​code>​
  
Line 1670: Line 1715:
 Video Stream Dimensions:​3840x2160 Video Stream Dimensions:​3840x2160
 Weather Read From File in 171  Position:​top_left MSG:1 {"​ret":"​0","​status":"​!Invalid rgn_idx 53\r\n"​} AimTrack:​[574,​ 2914] - [2060, 1628] Weather Read From File in 171  Position:​top_left MSG:1 {"​ret":"​0","​status":"​!Invalid rgn_idx 53\r\n"​} AimTrack:​[574,​ 2914] - [2060, 1628]
 +
 </​code>​ </​code>​
  
 ---- ----
  
-=== Another method to execute: ​ ===+=== Another method to execute: ===
  
 <​code>​ <​code>​
 curl -s --connect-timeout 30 --max-time 60 --data "​action=Overlay&​chn=1&​rgn_idx=1&​source=/​opt/​z3/​images/​fmoon-96.png&​type=png&​location=top_center"​ "​http://​192.168.10.127/​cgi-bin/​control.cgi"​ curl -s --connect-timeout 30 --max-time 60 --data "​action=Overlay&​chn=1&​rgn_idx=1&​source=/​opt/​z3/​images/​fmoon-96.png&​type=png&​location=top_center"​ "​http://​192.168.10.127/​cgi-bin/​control.cgi"​
 +
 </​code>​ </​code>​
  
Line 1686: Line 1733:
 <​code>​ <​code>​
 {"​ret":"​0","​status":"​+OK"​} {"​ret":"​0","​status":"​+OK"​}
 +
 </​code>​ </​code>​
  
Line 9844: Line 9892:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 //​**interface**// ​ TEXT, //​**interface**// ​ TEXT,
Line 9861: Line 9909:
  
 ---- ----
 +
  
 ==== GetCronJobs ==== ==== GetCronJobs ====
Line 9878: Line 9927:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 **//​enable//​** ​ INTEGER, **//​enable//​** ​ INTEGER,
Line 9901: Line 9950:
  
 ---- ----
 +
  
 ==== GetNFSMount ==== ==== GetNFSMount ====
Line 9918: Line 9968:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 **//​mounted//​** ​ TEXT, **//​mounted//​** ​ TEXT,
  
 ---- ----
 +
  
 ==== aspect_info ==== ==== aspect_info ====
Line 9941: Line 9992:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 //​**numerator**// ​ INTEGER, //​**numerator**// ​ INTEGER,
Line 9948: Line 9999:
  
 ---- ----
 +
  
 ==== boardinfo ==== ==== boardinfo ====
Line 9965: Line 10017:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 //​**logo_enable**// ​ TEXT, //​**logo_enable**// ​ TEXT,
Line 9984: Line 10036:
  
 ---- ----
 +
  
 ==== cam_state ==== ==== cam_state ====
Line 10001: Line 10054:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 //​**preset**// ​ TEXT, //​**preset**// ​ TEXT,
Line 10014: Line 10067:
  
 ---- ----
 +
  
 ==== camera ==== ==== camera ====
Line 10032: Line 10086:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 //​**zoom_direct_value**// ​ INTEGER. //​**zoom_direct_value**// ​ INTEGER.
Line 10127: Line 10181:
  
 ---- ----
 +
  
 ==== camera_exposure ==== ==== camera_exposure ====
Line 10145: Line 10200:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 //​**ae_mode**// ​ TEXT, //​**ae_mode**// ​ TEXT,
Line 10178: Line 10233:
  
 ---- ----
 +
  
 ==== camera_monitor_mode ==== ==== camera_monitor_mode ====
Line 10196: Line 10252:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 //​**modes**// ​ TEXT. //​**modes**// ​ TEXT.
Line 10203: Line 10259:
  
 ---- ----
 +
  
 ==== dec ==== ==== dec ====
Line 10221: Line 10278:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 //​**preset**// ​ TEXT. //​**preset**// ​ TEXT.
Line 10260: Line 10317:
  
 ---- ----
 +
  
 ==== download ==== ==== download ====
Line 10280: Line 10338:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 //​**FileName**// ​ TEXT. //​**FileName**// ​ TEXT.
Line 10289: Line 10347:
  
 ---- ----
 +
  
 ==== drs_tamarisk_settings ==== ==== drs_tamarisk_settings ====
Line 10307: Line 10366:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 //​**color_pallette**// ​ TEXT. //​**color_pallette**// ​ TEXT.
Line 10316: Line 10375:
  
 ---- ----
 +
  
 ==== enc ==== ==== enc ====
Line 10334: Line 10394:
 JSON formatted table with values below JSON formatted table with values below
  
-//​**ret**// ​ Custom return code of the HTTP POST request. 0 on success, -1 on failure.+//​**ret**// ​ Custom return code of the HTTP GET request. 0 on success, -1 on failure.
  
 //​**preset**// ​ TEXT, //​**preset**// ​ TEXT,
Line 10531: Line 10591:
  
 ---- ----
 +
  
 ==== filepicker ==== ==== filepicker ====
http_api.1709049496.txt.gz · Last modified: 2024/02/27 15:58 by anthony