LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Want to extract extract grayscale values from certain parts of an image

Solved!
Go to solution

Hi Everyone,

 

I want extract the grayscale values at certain parts of the image. I have graysclae values for the whole image and now want to get it from the certain part. I have drawn rectangles to get the (top, left, right and bottom points) of those areas (See imae). Could you please give an idea how to extract the required information. 

 

Regards

Hassan 

0 Kudos
Message 1 of 8
(2,009 Views)

The Array Subset node should be able to get you most of the way there - you want to convert your image to a 2D array of values (which you might already be doing to get the greyscale values for the whole image), and then you just want the subset that are within the locations you need.

 

You can use one Subset per region.


GCentral
Message 2 of 8
(1,992 Views)

 

Perhaps you want something like this:

px.png

"If you weren't supposed to push it, it wouldn't be a button."
0 Kudos
Message 3 of 8
(1,984 Views)

Hi, 

Just confirming.

In array subset I need for input (row, length, column, length). How I can get these inputs ? 

 

Rectangle is a cluster which needs to be un-bundle first. Which element should I put in which input mentioned above. Need guidance. 

Regards

Hassan 

0 Kudos
Message 4 of 8
(1,966 Views)
Solution
Accepted by topic author HassanIqbal

@HassanIqbal wrote:

Hi, 

Just confirming.

In array subset I need for input (row, length, column, length). How I can get these inputs ? 

 

Rectangle is a cluster which needs to be un-bundle first. Which element should I put in which input mentioned above. Need guidance. 

Regards

Hassan 


Left and top should be the indices, right-left and bottom-top the lengths... 

 

You don't need the Array Subset if you get the subset from the pixmap (as suggested)...

0 Kudos
Message 5 of 8
(1,954 Views)

@Proven Zealot, 

 

Left and top should be the indices, right-left and bottom-top the lengths... 

 

Even then its not working unfortunately. shows nothing in the subset array indicator. 

0 Kudos
Message 6 of 8
(1,950 Views)

@HassanIqbal wrote:

Even then its not working unfortunately. shows nothing in the subset array indicator. 


Post what you have. There might be a mistake...

0 Kudos
Message 7 of 8
(1,946 Views)

Thanks for your reply. 

 

I found out my mistake. was not wiring correctly. 

Regards

Hassan 

Message 8 of 8
(1,942 Views)