Nvsipl_camera configuration for srcRect, desRect, output format

Please provide the following info (tick the boxes after creating this topic):
Software Version
DRIVE OS 6.0.10.0
DRIVE OS 6.0.8.1
DRIVE OS 6.0.6
DRIVE OS 6.0.5
DRIVE OS 6.0.4 (rev. 1)
DRIVE OS 6.0.4 SDK
other

Target Operating System
Linux
QNX
other

Hardware Platform
DRIVE AGX Orin Developer Kit (940-63710-0010-300)
DRIVE AGX Orin Developer Kit (940-63710-0010-200)
DRIVE AGX Orin Developer Kit (940-63710-0010-100)
DRIVE AGX Orin Developer Kit (940-63710-0010-D00)
DRIVE AGX Orin Developer Kit (940-63710-0010-C00)
DRIVE AGX Orin Developer Kit (not sure its number)
other

SDK Manager Version
2.1.0
other

Host Machine Version
native Ubuntu Linux 20.04 Host installed with SDK Manager
native Ubuntu Linux 20.04 Host installed with DRIVE OS Docker Containers
native Ubuntu Linux 18.04 Host installed with DRIVE OS Docker Containers
other

Issue Description
Hello,
I’d like to make customized srcRect, desRect, output format for nvsipl_camera example.
Please provide some guide line for that.

Dear @wooseok.won,
Did you check --icrop parameter ? Could you elaborate a bit on the requirement. Is it like you want to select a specific portion from the image(srcRect) and resize the image(dstRect)?

Dear @SivaRamaKrishnaNV,
I’ve been working on the application which gets image data and then send it to ROS topic.
I found nvsipl_camera example is suitable for acquiring real-time image data an delivery it to my host application. Forum tickets 305570 and 305568 are related with the application.
Here is brief requirement.

  • Host application

    1. Set parameters
      -. Sensor : ar0820 onsemi
      -. Source Rect (x0, x1, y0, y1) by array → multiple interested areas
      ex. [ 4, 3844, 4, 2164], [1668, 2180, 970, 1258]
      -. Destination Rect(width, height) by array → paired with Source Rect
      ex. [ 960, 540], [ 512, 288]
      -. Port : a0 ~ d3 per Sensor
      ex. two ar0820 cameras connected on a0, a1 each.
      -. Frame_rate : 30 (Hz)
      -. Display Rect for the 1st camera : x0, y0, width, height
      -. Output format : YUV422 or RGBA
    2. Call (modified) nvsipl_camera app with passing defined parameters above
    3. Callback function from nvsipl_camera app with updated NvSciBufObj from OnFrameAvailable func
      -.
  • nvsipl_camera application

    1. main.cpp modified for having class and arguments from Host application

      int main(int argc, char *argv)

      replaced by

      int ApplSipl::Init(CCmdLineParser& params, std::function<void(const int id, NvSciBufObj* buffer)> callback_fnptr)

      -. Please refer to the attached file which shared in 305580 ticket
      No image on monitor during running nvsipl_camera based application - #4 by wooseok.won
      -. Given parameters need to be applied into the pipleline
      → Multiple Source Rect
      → Multiple Destination Rect
      → Output format
      -. NvSciBufObj pointer in the user callback function should have


      → Image data by given format
      → Host application shall be able to copy all the necessary data from the NvSciBufObj

@SivaRamaKrishnaNV
Please make this ticket as private one.
icrop only support vertical direction. → NVIDIA DRIVE OS Linux SDK API Reference: nvsipl::NvSIPLDownscaleCropCfg Struct Reference | NVIDIA Docs