Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Combustion image analysis, how to load 3000 image to analyze every frames?

Solved!
Go to solution

Salve, è il mio primo post qui ed è il mio primo approccio a labview Vision.

Studio da 2 settimane tutte le funzioni per utilizzarle al meglio, e sono arrivato ad un punto in cui non capisco i miei errori, o in alcuni casi, non so come risolvere.
Sono quindi qui per chiedervi aiuto.

Ho costruito questo .vi per analizzare delle immagini di combustione in un motore ad accesso ottico.

Il .vi inizia con il caricamento del file, già qui ho un problema, ovvero devo fare l'analisi di 3000 frame, il problema è che il nome del file è framexxxx (Es. frame0001,...,frame2999) per cui il sistema che ho attualmente costruito non è adeguato costruendo il nome nel seguente modo frame000x. Potreste aiutarmi a comprendere come posso risolvere?

Il secondo problema che incontro è relativo al mostrare l'immagine, non ho compreso quale funziona si utilizza per mostrare le immagini, si può osservare che ho utilizzato 2 blocchi (simili sul blockdiagram) dei quali uno funziona e uno no, volevo quindi consigli per capire quale è il più idoneo e quale no? perchè? Dove posso prendere quello più adatto?

Vi carico il vi con una decina di immagini cosi potete vedere l'attuale stato dei lavori e come funziona.

0 Kudos
Message 1 of 5
(198 Views)

Google Translate did a poor job, and your issue is not clear with the file name problem.

 

Sometimes it's necessary to convert a file name to text, and use regular expressions to sort the file names in the correct order, or sort by date.

 

I have frozen my labview license at 2021, as I want to own my software and not rent it, and you are using something newer.

 

We can discuss the file name issue, to start.

 

Robert

0 Kudos
Message 2 of 5
(153 Views)

Sorry, cannot look at your VI, but if you want to format a number padded with leading zeroes, here's one way:

 

altenbach_0-1711156561969.png

 

 

Maybe all you need is "list folder" with e.g. a "frame*.bmp" as patter, and you'll get all matching files sorted alphabetically. Now just autoindex on that array and load all files.

 

altenbach_1-1711157078581.png

 

 

0 Kudos
Message 3 of 5
(151 Views)
Solution
Accepted by topic author Nunzio1999

The second problem which you have here is displaying of the images.

 

Often forgotten that the IMAQ images passed by reference and not by value.

So, the typical error which almost every beginner has made (me myself is not an exception) is the following:

snippet1.png

You perform modification of the image on each step, but this is the same image, so you may get unexpected display of the next steps in the previous displays (kind of race condition, in general).

What I would like to recommend is to do like this, using dst input:

snippet2.png

Now each step will place modified image to the new (obviously they should have uniquer names), the original and intermediate images will stay unmodified and the problem goes away.

 

In additional, using long sequence structure is just hell, you don't need this. I would like to recommend to refactor this to the state machine design pattern, you will get much more flexibility and slightly more compact code which will fit into one screen. Using SubVIs also will simplify your code from top level point of view, but during experiments given pattern is more convenient un m< humble opinion. In the attachment — "quick and dirty" modification. Some developers will prefer to use string instead of typedef enum or may be some toolkits like JKI State Machine.

Message 4 of 5
(94 Views)

Thank u for your help, I followed all your suggest and complete the .vi.

It work, so now I need to understand the various IMAQ Manipulation vi to obtain the desidered result.
I'll came back soon with some question among this.

 

0 Kudos
Message 5 of 5
(47 Views)