LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

extracting a person from a image

how can i extract a person from its background in an image. Actually i want to calculate the area occupied by that person.

0 Kudos
Message 1 of 12
(3,603 Views)

Is this an image analysis application? If so use blob analysis. You will need to create a blob out of the person's image. Determine the size of a single pixel. Then count the number of pixels in the blob.  Mulitiply.

PaulG.

LabVIEW versions 5.0 - 2023

“All programmers are optimists”
― Frederick P. Brooks Jr.
0 Kudos
Message 2 of 12
(3,574 Views)

In order to create this blob in the first place, which is called "segmentation", you could use k-means as shown here in Kl3m3ns Blog:

https://decibel.ni.com/content/blogs/kl3m3n/2014/10/15/color-image-segmentation-based-on-k-means-cl...

 

 

 

0 Kudos
Message 3 of 12
(3,558 Views)

Unfortunately what he really needs here is not just Blob Analysis, it's Bob Analysis.  Measuring the area is easy with NI Image tools assuming there's a size reference.  The hard part here is going to be the A.I. that determines that a particular set of pixels form the shape of a human being.  Tricky even with a brute force approach where you have a huge library or "human-like" image data to compare to.

 

This topic probably does belong in the Imaging forum but either way the OP has to provide a lot more detail about his application if he expects any useful help on the subject.

LabVIEW Pro Dev & Measurement Studio Pro (VS Pro) 2019
Message 4 of 12
(3,539 Views)

@NIquist wrote:

Unfortunately what he really needs here is not just Blob Analysis, it's Bob Analysis.  Measuring the area is easy with NI Image tools assuming there's a size reference.  The hard part here is going to be the A.I. that determines that a particular set of pixels form the shape of a human being.  Tricky even with a brute force approach where you have a huge library or "human-like" image data to compare to.

 

This topic probably does belong in the Imaging forum but either way the OP has to provide a lot more detail about his application if he expects any useful help on the subject.


nice!

0 Kudos
Message 5 of 12
(3,502 Views)

Hi

 

Is there any way i can find the area of the white pixels alone in my grayscale image?

 

thankyou

0 Kudos
Message 6 of 12
(3,288 Views)

Hi niveraja,

 

yes: count them!

 

(You count all WHITE pixels and divide by the number of all pixels to get the percentage of WHITE in your image…)

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 7 of 12
(3,281 Views)
Hi

Yeah but how do I count in labview? I tried histogram but still can't figure out how to get the pixel count from the graph.

Thankyou
0 Kudos
Message 8 of 12
(3,270 Views)

Hi niveraja,

 

why don't you attach a VI with an example image and your histogram approach?

 

It's a rather good idea to use a histogram for that purpose…

Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 9 of 12
(3,265 Views)

Hi 

 

I have attached a thresholded image with the simple histogram VI I tried. Please help me get the white pixel count for this image.

 

Thankyou 

 

Download All
0 Kudos
Message 10 of 12
(3,245 Views)