Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Collapse
Brand Logo

ModalAI Forum

  1. ModalAI Support Forum
  2. Ask your questions right here!
  3. Masking qVio

Masking qVio

Scheduled Pinned Locked Moved Ask your questions right here!
12 Posts 2 Posters 4.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D droen8

    Hello Voxl Team,

    During testing my drone prototype which has about 2m diameter I've seen that the VIO seems to be detecting features on the drone arms etc. what makes loss of VIO quality by sticking points on a moving drone through the tracking sensor.

    In that case I've decided to mask disturbing elements to let the computing power takes place in free space out of the drone.

    I have tried to add mask trough config as this changes suggest https://gitlab.com/voxl-public/voxl-sdk/services/voxl-qvio-server/-/commit/c20b35e19f8fb289d272877648fd77e1afc7810c but It's not working I have used example mask I put in /etc/modalai/mask.pgm. I have tried to hardcode mask file path in code and rebuild voxl-qvio-server but without success.

    Link Preview Image
    Upload Image — Free Image Hosting

    Free image hosting and sharing service, upload pictures, photo host. Offers integration solutions for uploading images to forums.

    favicon

    ImgBB (ibb.co)

    Regards

    Alex KushleyevA Offline
    Alex KushleyevA Offline
    Alex Kushleyev
    ModalAI Team
    wrote on last edited by
    #2

    @droen8 , please review this post, the mask should work.

    Link Preview Image
    Add mask file to QVIO algorithm

    The mvVISLAM library supports a mask file to remove regions like legs, landing gear, etc. Adding that to the voxl-qvio-server would be very helpful. The fil...

    favicon

    ModalAI Forum (forum.modalai.com)

    You should try the example mask from this location : https://gitlab.com/voxl-public/voxl-sdk/services/voxl-qvio-server/-/blob/master/misc/mask_example_160x120.pgm and in this test case, you should observe half of image not finding any new features (easiest to check without moving). If features are found in unmasked region, the will be tracked through the whole image after that.

    If the mask is not working, then either the mask format is not correct or the mask file is not found. What camera are you using for QVIO?

    Alex

    1 Reply Last reply
    0
    • D Offline
      D Offline
      droen8
      Contributor
      wrote on last edited by
      #3

      Hi @Alex-Kushleyev,

      I am using ov7251 for tracking. I think I have made everything as described but it's still not working.

      https://ibb.co/XyDGG7w
      https://ibb.co/WkSDC2V
      https://ibb.co/6X5N6YV

      Regards

      Alex KushleyevA 1 Reply Last reply
      0
      • D droen8

        Hi @Alex-Kushleyev,

        I am using ov7251 for tracking. I think I have made everything as described but it's still not working.

        https://ibb.co/XyDGG7w
        https://ibb.co/WkSDC2V
        https://ibb.co/6X5N6YV

        Regards

        Alex KushleyevA Offline
        Alex KushleyevA Offline
        Alex Kushleyev
        ModalAI Team
        wrote on last edited by
        #4

        @droen8 , quick question, did you move the camera after starting vio or has it been stationary?

        Can you please try again by pointing the camera at a feature rich environment to make sure that top and bottom have many features and do not move the camera after you start qvio. I just want to double check.

        Also, something to check, if you provide an incorrect file name in qvio (or rename your mask), do you get a warning from qvio server saying that the file could not be loaded?

        Thanks

        Alex

        D 1 Reply Last reply
        0
        • Alex KushleyevA Alex Kushleyev

          @droen8 , quick question, did you move the camera after starting vio or has it been stationary?

          Can you please try again by pointing the camera at a feature rich environment to make sure that top and bottom have many features and do not move the camera after you start qvio. I just want to double check.

          Also, something to check, if you provide an incorrect file name in qvio (or rename your mask), do you get a warning from qvio server saying that the file could not be loaded?

          Thanks

          Alex

          D Offline
          D Offline
          droen8
          Contributor
          wrote on last edited by droen8
          #5

          @Alex-Kushleyev
          Yes I have tried multiple times, the screenshoot was taken after few restarts of voxl-qvio-server. It's for sure not using a mask.
          I have tried renaming mask and I have not seen any errors when mask do not exist in provided path. I have tried to display printf("Mask file name = %s \n", staticMaskFileName); in _hard_reset function and the path is displayed properely. I do not have idea how can I debug this issue.

          With existing file in mask_file_path:
          1677ac82-4c41-4957-bac1-0ec6cb3ba1b7-image.png

          Renamed file:
          a504e4a8-c563-44b3-a8cb-8b9b29210c92-image.png

          After renaming to ...maskWrongFilename.pgm :
          4d31af1b-06ac-4d69-af1e-b7a8f64b60b5-image.png

          Alex KushleyevA 1 Reply Last reply
          0
          • D droen8

            @Alex-Kushleyev
            Yes I have tried multiple times, the screenshoot was taken after few restarts of voxl-qvio-server. It's for sure not using a mask.
            I have tried renaming mask and I have not seen any errors when mask do not exist in provided path. I have tried to display printf("Mask file name = %s \n", staticMaskFileName); in _hard_reset function and the path is displayed properely. I do not have idea how can I debug this issue.

            With existing file in mask_file_path:
            1677ac82-4c41-4957-bac1-0ec6cb3ba1b7-image.png

            Renamed file:
            a504e4a8-c563-44b3-a8cb-8b9b29210c92-image.png

            After renaming to ...maskWrongFilename.pgm :
            4d31af1b-06ac-4d69-af1e-b7a8f64b60b5-image.png

            Alex KushleyevA Offline
            Alex KushleyevA Offline
            Alex Kushleyev
            ModalAI Team
            wrote on last edited by
            #6

            @droen8 , i believe there is a special command that silences the output of QVIO during initialization:

            Link Preview Image
            server/main.cpp · master · voxl / VOXL SDK / Services / voxl-qvio-server · GitLab

            GitLab.com

            favicon

            GitLab (gitlab.com)

            Please try to remove that wrapper SILENT_STD around the mvVISLAM_Initialize call and see if you get any messages about the mask file (when it has correct or incorrect file name).

            Sorry, there is no good way to debug this, but hopefully this will provide more information.

            Alex

            D 1 Reply Last reply
            0
            • Alex KushleyevA Alex Kushleyev

              @droen8 , i believe there is a special command that silences the output of QVIO during initialization:

              Link Preview Image
              server/main.cpp · master · voxl / VOXL SDK / Services / voxl-qvio-server · GitLab

              GitLab.com

              favicon

              GitLab (gitlab.com)

              Please try to remove that wrapper SILENT_STD around the mvVISLAM_Initialize call and see if you get any messages about the mask file (when it has correct or incorrect file name).

              Sorry, there is no good way to debug this, but hopefully this will provide more information.

              Alex

              D Offline
              D Offline
              droen8
              Contributor
              wrote on last edited by
              #7

              @Alex-Kushleyev thank you, I have not noticed that init function is wrapped. Now I can see that path is relative to /home/root

              14be1cd5-54a3-46d1-949c-750cf2fac0f4-image.png

              I will try in few if it's working but it will for sure 🙂 There is another error with Configuration.SF.xml should I have It in mind?

              Alex KushleyevA D 2 Replies Last reply
              0
              • D droen8

                @Alex-Kushleyev thank you, I have not noticed that init function is wrapped. Now I can see that path is relative to /home/root

                14be1cd5-54a3-46d1-949c-750cf2fac0f4-image.png

                I will try in few if it's working but it will for sure 🙂 There is another error with Configuration.SF.xml should I have It in mind?

                Alex KushleyevA Offline
                Alex KushleyevA Offline
                Alex Kushleyev
                ModalAI Team
                wrote on last edited by
                #8

                @droen8 ,

                Oh yes... you found the issue.

                I believe the other error (Configuration.SF.xml) is OK, we never used that file, so the configuration is passed via the mvVISLAM_Initialize call.

                I'll discuss with the team how to fix this path issue for the mask file

                Alex

                D 1 Reply Last reply
                0
                • D droen8

                  @Alex-Kushleyev thank you, I have not noticed that init function is wrapped. Now I can see that path is relative to /home/root

                  14be1cd5-54a3-46d1-949c-750cf2fac0f4-image.png

                  I will try in few if it's working but it will for sure 🙂 There is another error with Configuration.SF.xml should I have It in mind?

                  D Offline
                  D Offline
                  droen8
                  Contributor
                  wrote on last edited by droen8
                  #9
                  This post is deleted!
                  1 Reply Last reply
                  0
                  • Alex KushleyevA Alex Kushleyev

                    @droen8 ,

                    Oh yes... you found the issue.

                    I believe the other error (Configuration.SF.xml) is OK, we never used that file, so the configuration is passed via the mvVISLAM_Initialize call.

                    I'll discuss with the team how to fix this path issue for the mask file

                    Alex

                    D Offline
                    D Offline
                    droen8
                    Contributor
                    wrote on last edited by
                    #10

                    @Alex-Kushleyev It is not complaining about mask opening fail now but It is still not working:
                    fe72148b-20de-4a91-a7d6-b7fd95640f04-image.png
                    Voxl is stationary and I have tried reseting qvio:
                    852face3-0e7c-4cc7-92f7-4e88f50d243f-image.png

                    //edit the relativity of a path was due to me running voxl-qvio-server from there. When I run It as a service It is using absolute paths now. But still not working with repository example mask nor with my own mask.
                    4d59b0af-23dc-4a77-9ddb-97554fd1a580-image.png

                    Alex KushleyevA 1 Reply Last reply
                    0
                    • D droen8

                      @Alex-Kushleyev It is not complaining about mask opening fail now but It is still not working:
                      fe72148b-20de-4a91-a7d6-b7fd95640f04-image.png
                      Voxl is stationary and I have tried reseting qvio:
                      852face3-0e7c-4cc7-92f7-4e88f50d243f-image.png

                      //edit the relativity of a path was due to me running voxl-qvio-server from there. When I run It as a service It is using absolute paths now. But still not working with repository example mask nor with my own mask.
                      4d59b0af-23dc-4a77-9ddb-97554fd1a580-image.png

                      Alex KushleyevA Offline
                      Alex KushleyevA Offline
                      Alex Kushleyev
                      ModalAI Team
                      wrote on last edited by
                      #11

                      @droen8 , it looks like the mask file that I shared is not working. I did some digging and found that there is a formatting issue. if you open the pgm file with vi, you can see:

                      P5 160 120 255
                      ^@^@^@^@^@^@^@^@...
                      

                      but it should be:

                      P5
                      #
                      160 120
                      255
                      ^@^@^@^@^@^@^
                      

                      I am not sure how this happened.

                      I used vi to fix the sample mask, can you please try it? https://storage.googleapis.com/modalai_public/temp/voxl2-misc-packages/mask_example_160x120_fixed.pgm . Also, can you inspect the mask that you created? The PGM file should have the header above and then 8-bit mask entries where white (255) being where NO features should be found and black (0) where ok to have features.

                      Alex

                      D 1 Reply Last reply
                      0
                      • Alex KushleyevA Alex Kushleyev

                        @droen8 , it looks like the mask file that I shared is not working. I did some digging and found that there is a formatting issue. if you open the pgm file with vi, you can see:

                        P5 160 120 255
                        ^@^@^@^@^@^@^@^@...
                        

                        but it should be:

                        P5
                        #
                        160 120
                        255
                        ^@^@^@^@^@^@^
                        

                        I am not sure how this happened.

                        I used vi to fix the sample mask, can you please try it? https://storage.googleapis.com/modalai_public/temp/voxl2-misc-packages/mask_example_160x120_fixed.pgm . Also, can you inspect the mask that you created? The PGM file should have the header above and then 8-bit mask entries where white (255) being where NO features should be found and black (0) where ok to have features.

                        Alex

                        D Offline
                        D Offline
                        droen8
                        Contributor
                        wrote on last edited by
                        #12

                        @Alex-Kushleyev said in Masking qVio:

                        P5

                        160 120
                        255
                        ^@^@^@^@^@^@^

                        It is working now thanks. I have created mask in monochrome bmp and then used online tool to convert it into pgm but output had wrong header:

                        P5
                        160 120
                        1
                        ^@^@^@^@^@^@^
                        

                        I have used gimp now and exported with .pgm (binary) and it's working 😄

                        I put a preview mask on output image.
                        d4604289-19d3-462f-99e3-89dcc788282c-image.png

                        1 Reply Last reply
                        0
                        • Alex KushleyevA Alex Kushleyev referenced this topic on
                        • Gary HolmgrenG Gary Holmgren referenced this topic on
                        • Gary HolmgrenG Gary Holmgren referenced this topic on
                        • Alex KushleyevA Alex Kushleyev referenced this topic on

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        Reply
                        • Reply as topic
                        Log in to reply
                        • Oldest to Newest
                        • Newest to Oldest
                        • Most Votes


                        ModalAI
                        Categories Recent Tags ModalAI.com Docs
                        © 2026 ModalAI® · Accelerating autonomy for smaller, smarter, safer drones · Powered by NodeBB
                        • Login

                        • Login or register to search.
                        • First post
                          Last post
                        0
                        • Categories
                        • Recent
                        • Tags
                        • Popular
                        • Users
                        • Groups