This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

How could I get the 5MP JPEG from DM368IPNC?

 Hi,

      I want to get the 5MP JPEG from DM368IPNC, I found that DM368IPNC use MT9P031 which is a 5MP sensor, so I want to get 5MP picture from DM368IPNC.

      I'm trying to modify the drv.c which define the resolution, but it seem it doesn't work. So, I want to ask where should I change the code to get 5MP JPEG ?

  • Aaron,

        It's not so simple to support 5Mpixel as 3M or others, the big difference is IPIPE cannot handle 5M pixel directly due to line buffer limitation as 2176 Pixels.

        To support 5M pixel, you need first get the RAW data into DDR, and pass through IPIPE using dual-pass mode. and then get the YUV data for 5M pixel.

     

    Regards,

    David

  • Hi, David

         Get it!

         Thank you very much for your answer I'll go to have a look at it first:)!

  • Hi David,

    From your demo code, is the 5fps (5MP/MJPEG) the maximum output? Any possibility to reach to 12fps? Any clue will be appreciated.

    Gloria

  • Gloria,

        The bottle neck is the IPIPE for dual pass process, you may need adjust the IPIPE clock or change to DM368 for gain higher FPS.

     

    Best regards,

    David

  • David,

    So is there any guaranteed FPS record or the best performance of each resolution you've (or TI)  tested on DM368? I cannot do the limitation test if those limitations had been limited. Any information will be very appreciated.

    Regards,

    Gloria

  • David,

    My question will be which clock you mentioned can be adjustable for the FPS optimization? From datasheet, the sensor clock is now 120Mhz limited. Once if I need the 5MP output up to 12FPS (w/ 9p031 sensor), it will require higher external clock. Where can I do this?

    Thanks,

    Gloria

  • Hi,
    i have applied these changes for a DM365IPNC-MT5 application
    when i start av_server in 5MP MJPEG mode i obtain a CMEM error

    CMEMK Error: ioctl: failed to allocate heap buffer of size 0x4c9400
    CMEM Error: allocHeap: ioctl CMEM_IOCALLOCHEAP failed: -1
    ERROR  (avServer.c|AVSERVER_bufAlloc|303): OSA_cmemAlloc()
    ERROR  (avServerMainThr.c|AVSERVER_tskStart|192):

    i use default mem_mng.h and this insmod cmemk.ko

    insmod cmemk.ko phys_start=0x83800000 phys_end=0x88000000 allowOverlap=1 phys_start_1=0x00001000 phys_end_1=0x00008000 pools_s1=1x28672

    and these environment variables on uboot

    bootcmd=tftpboot 0x80700000 uImage; bootm 0x80700000
    bootargs=console=ttyS1,115200n8 noinitrd rw ip=$(ipaddr) root=/dev/nfs nfsroot=$(nfshost):$(rootpath),nolock mem=56M

    what have i to change to solve this problem? which is the way to increase the necessary memory?

    Regards,
    Andrea

  • Andrea,

        When set to 5MP support, it need huge CMEM memory since RAW data will be 5MB, YUV data will be 7.5MB per buffer. 

        What you need do is change Linux kernel memory be 42MB (or even less) and use all the others for CMEM.

     

    regards,

    David

  • Gloria,

        If you just modify to supprt 5MP, it will be only around 6FPS, but you need do some system level optimization. It's possible to achieve 12FPS 5MP capture + encoding.

     

    Regards,

    David

  • Hi David,
    i have changed kernel memory to 36MB and i haven't that error anymore, thanks

    the 5MP jpeg that i obtain using GetAVData() is always black
    could you give me any suggestion?

    also if i try capture mode RAW in DDR with 3MP MJPEG i obtain black image
    have i to setup up something else than what described in your attached?

    regards,

    Andrea

  • Hi,
    i have noted that capturing image with AVSERVER_CAPTURE_RAW_IN_MODE_DDR_IN the image is first correct then it loses brightness until get a black image
    what could cause it? this doesn't happen in AVSERVER_CAPTURE_RAW_IN_MODE_ISIF_IN

    could someone help me?


    Best regards,
    Andrea

  • Hi Andrea,

    One possible cause of this problem can be Auto Exposure and AWB operation. I have not tried this feature myself, but it is very much possible that the AE might not be tuned for 5MP mode. Can you try to do capture by turning off AEWB?

    Regards,

    Anshuman

  • Hi Anshuman,
    i have already tried to execute av_server without AEWB option but the result seems to be the same
    there are any other threads in application that can modify exposure or white balance params?

    regards
    Andrea

  • Andrea,

        Could you try to use Tunning tools to get the raw image and YUV data to check it out? May try using both3M pixel and 5M pixel mode. 

     

    regards,

    David

     

  • Hi David,

    i have attached the RAW and YUV images obtained executing

    ./av_server.out 3MP MJPEG 40 &
    ./av_server.out 5MP MJPEG 40 &

    i hope you can help me
    best regards,

    Andrea

    raw_yuv_images.zip
  • Hi,

    to solve this issue i have to debug av_server application
    which ubuntu development environment can you advise me?

    is it possible to use eclipse?

    regards,
    Andrea

  • ADC said:

    Hi,
    i have noted that capturing image with AVSERVER_CAPTURE_RAW_IN_MODE_DDR_IN the image is first correct then it loses brightness until get a black image
    what could cause it? this doesn't happen in AVSERVER_CAPTURE_RAW_IN_MODE_ISIF_IN

    Has anyone encountered this problem?
    I have never solved it

    Could someone help me? I don't know what to modify in av_server code

    best regards,
    Andrea

  • The only way i have found to solve that problem is to disable creation of display thread in av_server application
    What is the function of this thread?

    I can't understand the connection with my DDR capture mode problem... if i try to empty thread main function the application doesn't function anymore
    Could someone help me?

    regards,
    Andrea


  •  

    The dm365IPNC 2.0 version supports 5MP JPEG  encoding with the aptina sensor.  It is already a tested version.

    But streaming  is not supported by RTSP standard. So you have to store the image in sd card or through ftp transfer.

     

  • I'm using that version of DVSDK and i had to modify the application code to capture 5MP how decribed by DBian
    Do you mean another version than the one downloaded form here?

  • But I Saw the changes for 5MP  already done in IPNC 2.0  and I am able to see the 5MP images from that version from Appro.

    You need not make any changes on that version . it has been released 1 month before.

     

     

    Regards,

    Mahendra kumar

     

     

     

     

     

     

     

     

     

     

     

  • Hi Mahendra kumar,
    where can i download this version? have i to ask for it to Appro?

    regards,
    Andrea

  • We got it from Appro  ftp site deticated for our company.  Please ask appro for it.  I do not have rights to distribute it.

    Regards,

    Mahendra Kumar

     

     

  • Hi Andrea,

    Have you been able to solve the 5MP resolution problem? If yes, can you please tell me how did you do this?

    I am using a similar camera (DMVA2IPNC-MT5) and want to get 5MP resolution (any format e.g., MJPEG)  from the camera. But, so far, I have been quite unable to achieve this. I reduced the linux memory up to 27M and gave the rest to CMEM, but to no avail. I also changed the memory configuration in mem_mng.h and mem_mng.c to set higher cache and memory for 5MP MJPEG, but no use. I will really appreciate if you can help me. 

    Since the thread is very old, it would be better if you reply me at my email :    umair.khan@uni-klu.ac.at

    Regards,

    Khan

  • Hello!

    I succsefully encode H264 4MP (2368x1744) and 5MP (2560x2048) and see it via RTSP. But I have one problem - I see only vertical line, not correct image.

    How can I solve this?

    Thank you and excuse me for my bad english.