LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Merge 2D pictures

Solved!
Go to solution

Trying to reproduce @wiebe's example

 

What is the name of the function used to transform the cluster and color box into a picture?

Captura de tela 2024-02-28 111704.png

0 Kudos
Message 11 of 18
(396 Views)

@mthheitor wrote:

Trying to reproduce @wiebe's example

 

What is the name of the function used to transform the cluster and color box into a picture?

Captura de tela 2024-02-28 111704.png


Screenshot 2024-02-28 15.38.50.png

Message 12 of 18
(389 Views)

I found it, it's the Draw Rectangle.vi

Captura de tela 2024-02-28 113646.png

 

But now I have another question:

I'm using the "Get Image" invoke node to get image from two 2D graphics in the Front Panel

How can I merge these two images into a single png file?

 

Captura de tela 2024-02-28 113953.png

 

0 Kudos
Message 13 of 18
(388 Views)

@mthheitor wrote:

 

I'm using the "Get Image" invoke node to get image from two 2D graphics in the Front Panel

How can I merge these two images into a single png file?

 

 


It depends from what you needed. How to "merge" - side by side, or something else? Try to draw both images into single picture, then convert it to Pixmap, then save to PNG using Write PNG File, that is.

Message 14 of 18
(385 Views)

Yes, I want to get both XY Graphs in a single .png file, one above the other like in Fig.1

 

Fig. 1Fig. 1

 

LabVIEW can export one graph using the instructions "Get Image" + "Write PNG File.vi" (Fig. 2). This process it's very simple and uses only one wire.

Captura de tela 2024-02-28 154603.png

 

My initial questions are:

1. Is there a way to combine the "Image Data" of both XY Graphs?

2. Or do I need to use the Invoke Node "Get Image", convert the "Image Data Cluster" using "Unflatten Pixmap.vi" (Fig. 3) before anything else?

 

Fig. 3Fig. 3

 

 

0 Kudos
Message 15 of 18
(367 Views)

@mthheitor wrote:

Yes, I want to get both XY Graphs in a single .png file, one above the other


The simples way to do this is something like that:

snp2.png

In horizontal direction will be a little bit more complicated, but also possible, of course.

Message 16 of 18
(351 Views)

@Andrey_Dmitriev wrote:

@mthheitor wrote:

Yes, I want to get both XY Graphs in a single .png file, one above the other


The simples way to do this is something like that:

 


And this will work in assumption that you have exactly the same width of the both graphs. If not - then you have to copy line by line and fill the gap on smallest graph.

Message 17 of 18
(340 Views)

Maybe you could put both graph on a Tab control, and call Get Image from the Tab instead of merge 2 images.

 

George Zou
Message 18 of 18
(317 Views)