12-02-2020 04:59 PM
Hi. I have a problem which involves merging two images. Essentially i have an image with a person in front of a greenscreen and a background images. I want to create a VI where all the relevant green pixels from one image are replaced with the pixels from the other image, with some user interface which can adjust some parameters. I was wondering if anybody could help ?
Solved! Go to Solution.
12-02-2020 05:19 PM
Do you want to learn how to "do this yourself", or are you looking to hire someone to do this for you? Do you have LabVIEW and experience in LabVIEW programming? Are you planning to use NI's "Vision" Toolkits (and do you already have them, and experience in using them)?
Bob Schor
12-02-2020 05:41 PM
Hi Bob, yes I would like to learn how to do this myself ideally, some guidance or examples may be useful. I have Labview and minimal experience, im intending to complete the task using only Labview standard tools and blocks. I will attach my very much failed attempt at the task so maybe you can see where im trying to go, although i may be going in the complete wrong direction. Thanks for your help
12-03-2020 06:23 AM
I would recommend using NI Vision which has a library of useful functions.
You can start by reading the IMAQ Vision concepts manual Chapter 14 Color inspection, and then move to the LabVIEW example finder for NI Vision Color.
12-09-2020 09:20 AM
Hi Bob,
I was wondering if you could help me with my problem. So I essentially want a programme which
12-09-2020 09:34 AM
Hi
I was wondering if anyone could help me with my problem. So I essentially want a programme which
12-09-2020 09:36 AM - edited 12-09-2020 09:39 AM
Hi AJ,
@AJ1507 wrote:
So I essentially want a programme which test all three colours of an image (JPG). Then use the results of all three tests to make one decision that a pixel is "green" or not and, if it is "green", then swap that whole pixel for the one from the other picture. Using standard LABVIEW without any add ons. To essentially use green screen to superimpose one image onto the other one.
So what have you tried so far? Mind to attach your current VI with two example images (one with green screen, one with "other pixels")?
How do you define "green"? I would suggest to implement to test the RGB value of a pixel:
IF R and B rather small, while G is rather large THEN "green" ELSE "not green"
Define your limits for the typical range of 0…255 for individual colors!
(A little bit more advanced would be to convert from RGB to HSV and only check the H value.)
Iterate over all the pixels in the image…
Edit after merging your other message:
Please keep things in one place! No need to start a new thread for the very same problem!
12-09-2020 10:03 AM
Hi Gerd,
Thank you very much for your response and apologies for starting a new thread. I am new here. I have attached my current VI, as I'm sure you can see from it I am getting rather confused with things, however it may make more sense as to what I'm trying to achieve. I want to test the pixels (although knobs may not be the best way) to adjust thresholds and find the right threshold for what i define as 'green' my next problem is how to replace the 'green' pixel with a pixel from the other image. I believe using the RGB the way I am isn't correct as i want to replace the whole pixel not just RGB elements of it.
12-09-2020 10:19 AM - edited 12-09-2020 10:20 AM
12-09-2020 10:33 AM
Thank you very much Gerd. That is extremely helpful, and something i can now play around with.
Once again thank you very much for your help