Announcement

Collapse
No announcement yet.

Real Time Image Update

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Real Time Image Update

    Hi,
    I have gen4-ulcd-24DT and I want to update the image in real time with a rate of around 8 images per second . I am new with this system and I wanted to know if it is possible to do so and any reference code or project is available in supporting it . Any help would be appreciated .
    Thank You

  • #2
    Hello,

    By the means of updating the image, do the images come from the mounted SD card or from another host microcontroller?

    In terms of playback it would also depend on the image size that will be shown on the display.
    For the Diablo16 processor it is around ~1,220,000 pixels per second when showing image from the uSD card.
    From external host, it would depend on how fast the image data transfer from the host to the display module.

    You can use the user image widget to flash sequential images or use the video widget if you are using video file.
    You can check this projects as reference:
    https://www.4dmakers.net/projects/details/video-player
    https://www.4dmakers.net/projects/de...al-photo-frame

    I hope this helps

    Best Regards,


    Comment


    • #3
      Hello,

      Thank you Jerson for the reply,
      what I want to do is send an image from host to the display in real time . My host is a PC where I'm using LabVIEW software environment to interact with the display . We have a method to send data serially out to the LCD and I have tested it using simple button on the screen and I was able to communicate and change value of the button(make it ON and OFF) by sending the command to the screen in the form of CMD(object ID-object Index)-PARAM-CHKSUM but I am having few queries and it would be helpful if you can answer those

      1) If I am having three buttons 4Dbutton01 4Dbutton02 and 4Dbutton03 I am unable to use them according to object index , for any index it is taking only one button(first place button in most cases)

      2) How to change the button action to either latch or switch because after giving any value to a button it is returning to its previous state which happens for a latch action whereas I want switch action.

      3) For the objects like slider meter etc even though maximum value is high it is only taking 0 and 1 as a value but nothing greater than that .

      4) While using User Images the parameters which is the data to be sent is given as MSB and LSB which is of two bytes but of my knowledge data of the image will be the data of pixel values which can be an array so if I am having pixel values array can I send it directly as data to the user images object in PARAM or do I have to do any manipulation to the pixel data to get into MSB and LSB form and then send it as PARAM ?

      Any help or reference would be appreciated.

      Thank You
      -Sumanth

      Comment


      • #4
        Hello,

        Userimage widget can only access uSD card images stored in GCI format, so it is not possible to use it that way.

        If you want to transfer and display image from the host to the display, you will have to program it manually in 4DGL. Also please take note that the frame rate would also drop significantly in this method. It would also be very difficult to do image transfer in ViSi-genie since it will block the main functionality for the widget and command handling, hence it is recommended to use the ViSi or Serial SPE environment for this.

        You can check this as reference for transferring image from a host to display.
        Serial Arduino Block Image Transfer
        https://www.4dsystems.com.au/appnote/4D-AN-00137/

        For your queries regarding the ViSi-genie widgets:

        Can I ask how you are accessing the widgets?
        You can use the Workshop4 GTX tool under the tools tab to test commands for the buttons and sliders.
        Button mode can be changed by setting the "momentary" option in the properties tab to one of this:
        Yes - Momentary Switch mode
        No - Toggle Switch mode

        I hope this helps,
        Best Regards

        Comment


        • #5
          Thank You Mr. Jerson for your support I'll check the app notes which you've shared and get back to you in a while if there's any issue.

          Regarding accessing the widgets I am defining them in visiGenie and accessing them from "LabVIEW Software" installed in host PC as I said earlier (We have a method to send data serially out to the LCD and I have tested it using simple button on the screen and I was able to communicate and change value of the button(make it ON and OFF) by sending the command to the screen in the form of CMD(object ID-object Index)-PARAM-CHKSUM but I am having few queries and it would be helpful if you can answer those)

          1) If I am having three buttons 4Dbutton01 4Dbutton02 and 4Dbutton03 I am unable to use them according to object index , for any index it is taking only one button(first place button in most cases)
          -for this one i need to know exactly how the object id and object index works and what values will it take ?

          2) For the objects like slider meter etc even though maximum value is high it is only taking 0 and 1 as a value but nothing greater than that
          -I'm unable to resolve this issue and yes i have used GTX Tool to test and the behaviour was the same

          Thank you

          Comment


          • #6
            Hello,

            In order to command the display effectively, you should send the correct Object Write command format to the display module which is comprised of the following:

            Command_Code + Object_ID + Object_Index + Value(MSB) + Value (LSB) + Checksum

            - The Object ID is the byte that refers to the specific widget type in the project, value for corresponding widget is listed in the ViSi-genie reference manual (ie. Userbutton, 4Dbutton)
            - The Object Index is the byte that specifies the index or item number of the Object, value corresponding to the instance of the widget selected (ie. Userbutton 0, button 1)

            For a highly detailed explanation about writing to various Genie Objects in the ViSi-genie environment, you can check this appnote for reference:
            ViSi-Genie Writing to Genie Objects Using an Arduino Host
            https://www.4dsystems.com.au/appnote/4D-AN-00018/

            You can also refer to the Commands and Parameters Format table (Chapter 3.1) found in the ViSi-genie Reference Manual pdf.
            (Can be accessed by pressing F1 in the WS4 IDE or can be accessed at: https://www.4dsystems.com.au/product..._IDE/downloads)

            I hope this helps,
            Best Regards,
            Last edited by Jerson; 10th September 2018, 06:53 PM.

            Comment


            • #7
              Hello Jerson,

              I am now clear about commands and how to write values to different objects , coming to my actual objective which is to send images to the display continuously which I understood that it cannot be done using visiGenie(User Images Widget).

              I have seen the following-
              a)Serial Arduino Block Image Transfer
              https://www.4dsystems.com.au/appnote/4D-AN-00137/
              b)https://forum.4dsystems.com.au/forum...es-saved-in-sd

              One method which i found feasible is to access the image matrix (access every pixel with its color) stored in SD card and change any pixel color for another color and then print it on the screen. Does it work in this way ?
              so on changing the pixel values and updating to the screen it would be changing the images on the screen but i don't know how to implement this.

              Thank you for help so far expecting to get to a solution as soon as possible.

              Comment


              • #8
                Hello again ,

                I am sending the pixel data to the screen directly using BLIT Com to Display using my host environment in the same way as done in the app notes suggested by you ( Serial Arduino Block Image Transfer https://www.4dsystems.com.au/appnote/4D-AN-00137/) and I am able to send the data(reference shown in image) and get some image on the screen but there is an issue

                The image which is getting displayed on the screen is having only one colour which is a blue shade with intensities changing so do I have to send the data exactly as 565(RGB) to get the exact image as the one which I have sent , right now I'm sending gray scale representation of 16 bits.

                Some times the data is not being shown on the screen even after sending the data it shows 4d systems getting started screen . What possibly might be the reason ? Is there anything to be done specifically before using the screen in serial mode ?
                Attached Files

                Comment


                • Jerson
                  Jerson commented
                  Editing a comment
                  Yes, it will need to be in 565 RGB since there is no greyscale in the display.

              • #9
                Hello,

                The method of modifying the .gci file at runtime will be a difficult approach. One way of implementing this is similar to the Block Image Transfer method (BLIT); with some modifications especially on addressing which pixel byte to modify during update. This however, will reduce the frame rate significantly since it will have to do read/write/display operations.

                If you want display real time images with higher frame rate while doing large mathematical calculations and graphics creation, I could suggest doing it with a Raspberry pi with a 4DPi HAT display module or with a Beaglebone with the 4DCape Display Module.

                Best Regards,

                Comment


                • #10
                  What can be the maximum frame rate(approximate) if I am following BLIT method and it is given pixel1,pixel2.....pixeln here what can be the maximum value of n ? will it depend on memory size of the device if yes how much it will be ?
                  Some times the data is not being shown on the screen even after sending the data it shows 4d systems getting started screen . What possibly might be the reason ? Is there anything to be done specifically before using the screen in serial mode ?

                  Comment


                  • #11
                    Hi,

                    If you'd like, you can test the "blitComtoDisplay" command using the
                    Serial Commander tool under the Tools Tab.

                    On Serial Environment follow these steps:
                    1.) Open the SPE Load Tool
                    2.) Open the Serial Commander Tool
                    3.) Under "Other" Tab, you will find the blitComtoDisplay command
                    4.) Click send, and choose a gci file.

                    If dont have a gci file, you can use the Graphic composer tool to
                    generate a gci file of the image.

                    Click image for larger version

Name:	Serial.PNG
Views:	1
Size:	10.8 KB
ID:	65331

                    Or you can create a new file on ViSi Environment, attach an image,
                    then compile and download.

                    Processing the data will take seconds depending on the baudrate you are
                    using and the size of the image. The value of n will depend on the size of the image
                    since you will fill the display pixel by pixel.

                    Though filling the whole display is not recommended since it will take too much time.

                    Some times the data is not being shown on the screen even after sending
                    the data it shows 4d systems getting started screen.
                    It might be because command is not recognized. Perhaps you can
                    get an idea when you use the Serial Commander Tool.

                    Best Regards,
                    Kevin

                    Comment


                    • #12
                      Hello,
                      Thank you guys for all your help regarding this issue especially Mr. Jerson . Finally I am able to display images in real time and with appreciable speed by increasing the baud rate in serial mode . It would have been very difficult without your help dealing my problem with patience and helping me out . This issue is solved out .
                      Just FYI I am using BLIT method to transfer images in real time to the screen and able to get the images at the rate of 1-2 images per second in serial environment .
                      I have another queries with the usage of screen . Can i post them here or shall I start another discussion.
                      Thanking you(with utmost gratitude and respect)
                      -Sumanth

                      Comment


                      • #13
                        Hello,

                        Glad to know that you've resolved the problem. If you have another query, you can post them here or start a new topic discussion.

                        Best Regards,

                        Comment

                        Working...
                        X