Jump to content
Shaun07

Remove the the background form the image

Recommended Posts

 

Hello All,

 

I am new to the camera labview programming. 

 

For my research work, I am using camera to grab the live image. I am stuck with one problem. 

how to treat the background?

I tried to subtract the constant value from the entire image, but with that i am loosing few of my data.

I know one solution, but I don't know how to implement this solution. 

Problem: how to take the values from the 4 corner of the image and subtract those value from entire image?

 

If anybody previously develop similar stuff then please help me out for this. 

 

Any help would be appreciate.

 

Thanks,

Shaun

new.png

removebackground.vi

Share this post


Link to post
Share on other sites

If you really want the pixel values, you can get those (http://zone.ni.com/reference/en-XX/help/370281AC-01/imaqvision/imaq_getpixelvalue/) and then use the imaq subtract with a constant.

However: one thing you'll note is that many of the analysis functions have a "mask" input. One route to get rid of the background would be to use a threshold function to get a mask (https://forums.ni.com/t5/Example-Programs/IMAQ-Threshold-Binary-Image-and-Mask/ta-p/3534077) and then feed that mask into, as an example, the histogram function (http://zone.ni.com/reference/en-XX/help/370281AD-01/imaqvision/imaq_histogram/). Per the help:

Quote

 

Image Mask is an 8-bit image specifying the region in the image to use for the calculation. Only those pixels in the original image that correspond to an equivalent non-zero pixel in the mask image are used for the calculation. The entire image is used in the calculation if Image Mask is not connected.

 

 

On a related topic, it could be worth looking at http://www.ni.com/pdf/manuals/371007b.pdf and http://www.ni.com/pdf/manuals/322916b.pdf. I think both are now part of the imaq help (the second pdf became this, I believe: http://zone.ni.com/reference/en-XX/help/370281AD-01/TOC1.htm) but I find the PDF to be nicer to look at. So for example you might use the particle analysis functions or the edge detection functions to find your glowy dot and get other characteristics about it, depending on what you are looking to do.

Share this post


Link to post
Share on other sites

Hello Smithd,

 

Thank you so much for suggestions. Definitely, all those suggestion gonna help me to figure out the pixel value. 

But, Did you implement any kind of background correction algorithm? related to what I am trying to do. (i.e. Averaging 4 corner values). 

Even though if you didn't do it do you have nay idea how to get the average values for all those corner?

 

Thanks  

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By David Akinpelu
      I am implementing a TCP connection between MyRio(client) and Python(server). The goal is to send data from the server to the client, perform some calculations, and send the result to the server. I need to keep changing the data being sent to the client. I noticed the first data works fine and the result returned to the server, but the client could not read subsequent data. I debugged and was able to detect that the error is coming from the first read function is the "Reading values subvi"  but I don't know how to correct it. How do I go about it?
      I have attached the files below.
      Reading Unknown Bytes from TCP.vi Second_client.vi SimpleServer.py
    • By Deon
      The Threshold Hysteresis VI allows an input (for example, a sensor) to drift out of an inner limit without generating an invalid flag, but if it drifts outside an outer limit it then becomes invalid. For the reverse, when the input crosses back into the outer limit it remains invalid until the value falls inside the inner limit.
      For simplicity, only one input parameter is provided for both the inner & outer limits, and is negated for the lower limit, as generally tolerance limits are equidistant from the nominal.
    • By Deon
      View File Threshold Hysteresis v1.0 LV8.6.1
      The Threshold Hysteresis VI allows an input (for example, a sensor) to drift out of an inner limit without generating an invalid flag, but if it drifts outside an outer limit it then becomes invalid. For the reverse, when the input crosses back into the outer limit it remains invalid until the value falls inside the inner limit.
      For simplicity, only one input parameter is provided for both the inner & outer limits, and is negated for the lower limit, as generally tolerance limits are equidistant from the nominal.
      Submitter Deon Submitted 11/10/2014 Category General LabVIEW Version License Type  
    • By jossie
      Hello I am quite new to labview and I have some questions regarding labview. We have came up with a simulation build in labview as shown in the folder. However, we will be making use of Myrio to connect current and voltage sensors to send the data to labview when labview is running. We are currently having difficulties trying to search if it is possible to send the wave files and the popout messages ( messagebox.vi and Player2Wins.vi) to NI Dashboard for Labview in Ipad by using myrio. Is it possible for myrio to store wave files and the additional VIs and sending these to NI Dashboard for Labview? 
       
      Otherwise, it is possible for Labview to send the entire program.vi, messagebox.vi and Player2Wins.vi to cloud and people are able to see the GUI in program.vi remotely? ( We have found information like Labview web services etc. We hope that people are able to view our GUI and press the " Press start" button as well as closing the popout messages in a website not from our local network). 
       
      I sincerely apologize if what I am asking does not make sense to people who are reading this. I hope that someone will help me with this as it is very difficult for me to do and I need some guidance from people who are familiar with these. Thanks for taking your time to read and your reply. 
      Simulation_Build_(3).zip Pop-up_Message.vi Player2Wins.vi
    • By edupezz
      Hello, i created a new tips repository in:
      https://edupez.com/
      English and Portuguese
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.