Example Code

Automotive Gauge Meter Toolkit

Code and Documents

Attachment

Overview

 

In a automotive cluster still comom analog gauges to indicate, for example, the speed, revolution counter, amount of fuel, temperature, etc. Hence, a demand to test them indeed requires.

 

The Automotive Gauge Meter Toolkit is a useful package to measure the angular movement of analog automotive gauges, then checking whether it is performing as expected.

 

 

Description

 

Following the same concept of LabVIEW tools as Optical Character Recognition (OCR), Texture and Color Classification on NI Vision Development Module, Automotive Gauge Meter allows you to load a configuration file created on Gauge Training application (included in this toolkit) as well as train programatically.

 

Functions Palette:

Addons->Automotive Gauge Meter

AGM palette.png

 

Addons->Automotive Gauge Meter->Low Level

AGM Low Level palette.png

 

 

Examples

 

There are 3 examples (Fuel and Temperature gauge.vi, Speedometer Gauge.vi and Tachometer Gauge.vi) that load the respective gauge configuration file and take measurements. For an example of training programmatically see Gauge Training.vi.

 

Examples Palette:

Addons->Automotive Gauge Meter->Examples

AGM Examples palette.png

 

Example 1 - Fuel and Temperature Gauge.vi

AGM Ex1.png.pngAGM Ex1 diagram.png
 

Gauge Training

 

Bellow are the steps needed to create a gauge configuration file:

 

Step 1

 

Choose a images folder and a gauge name.

AGM training step 2.png

 

Step 2

 

Select the region of interest (ROI).

AGM training step 2.png

 

Step 3

 

Choose the gouge rotation as clockwise or counterclockwise.

AGM training step 3.png

 

Step 4

 

Select the threshold value.

AGM training step 4.png

 

Step 5

 

Teaching the reference position.

AGM training step 5.png

 

Step 6

 

Teaching the reference position.

AGM training step 6.png

 

After that the gauge label will be extracted and it is able to save the gauge configuration file.

AGM training step 7.png

 

It is also possible to test the configuration file you have done by clicking on Snap buttom.

AGM training step 8.png

 

Requirements

 

- LabVIEW >= 2014

- Vision Development Module >= 2014

- VI Package Manager

 

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Tsjabrantes
Member
Member
on

Amazing!

 

Telles thanks for sharing these nice and powerful tool.

 

Tarciso Junior
+55 (11) 996-282-103
Skype: Tarciso.junior2
Email: Tsjabrantes@gmail.com
http://br.linkedin.com/pub/tarciso-junior/23/a83/463
sankar06
Member
Member
on

Nice work....!

Happy to Wire
nguyenxuanthai
Member
Member
on

Dear Telles.

 

First of all thank you very much for very nice tool kit.

 

I'm working for Volume and Flow lab. in Vietnam metrology institute now.

 

I'm in water meter recognition project by labview (with vision development toolkit ad dons). 

 

I tried your toolkit, but at this time i'm not successful.

 

Plea see attached file is image example and give me more instruction.

 

Best regards!

jpeg_0003.jpgjpeg_0004.jpgjpeg_0006.jpgjpeg_0007.jpg

 

telles_s
NI Employee (retired)
on

 Hi Thai,

 

The toolkit accepts only monochromatic images and gauges with black background. If you have one of the opposite cases, you can use color plane extraction (some cameras has this functionality, so no need to do in LabVIEW) and/or reverse lookup table.

 

However, in your case the toolkit wont work because the gauge needle is almost the same size that the scale numbers. The toolkit extract the scale label and when the gauge needle is right up a number, there won't be particles to calculate the reference as well as the angle. In this application specifically, I would suggest use Color Threshold, Particle Filter, Particle Analysis getting Max Feret Diameter Start X,Y and End X,Y parameters, and then calculate the reference line and angles with it. I did a quick test and got the result:

 

testing_result.JPG 

 

 

 

 

 

 

 

 

 

 

I hope it help.

nguyenxuanthai
Member
Member
on

Hi Telles-s,

Thank you very much for your comment

I tried color plane extraction on my camera, and it' ok.

Could you send me your block diagram on the toolkit as the picture on screenshot?

My email xuanthai.vmi@gmail.com.

Thank you and best regards.

telles_s
NI Employee (retired)
on

VI.JPG

nguyenxuanthai
Member
Member
on

Dear Telles-s

 

Thank your very much. I'll try with your recommendation

Contributors