From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

getting images continuously

Ahhhh Valencia... jejeje... me acuerdo como si fuera ayer de las fallas !

Espero que podras sacar ideas buenas de lo que te adjunto 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 11 of 18
(1,262 Views)
Hola,

perdon, unas correctiones mas y esta mejor 😉

PD : tal vez puede funcionar con una mas pequeña pausa... depende de la potencia del ordenador y de la velocidad que necesitas...


Message Edité par TiTou le 04-27-2006 07:11 PM


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 12 of 18
(1,261 Views)
Gracias por tu ayuda Antoine. Lo que me has enviado funciona bien, pero cuando el programa se ejecuta continuamente y hay muchos errores por capturar, la CPU con el tiempo se satura (es lógico, pero es que por ejemplo capturando 2 fallos por segundo el programa en 3 minutos se para! es muy poco tiempo!). ¿Sabes alguna manera de hacerlo de manera más eficiente?. A mi se me han ocurrido dos cosas, pero no me han dado resultado.
 
1) Utilizar Append Control Image to Report. vi para guardar la imagen del control en mi informe directamente.
2) Realizar primero la fase de adquisición y cuando esta acabe dibujar las gráficas, el problema es que fuera del while loop del programa que te envié ya no tengo los valores de la señal.
 
Bueno, pues ya me dices si se te ocurre algo. Y muchas gracias por ayudarme, si vienes por Valencia a las fallas otra vez avísame.
Gracias.
Luz
0 Kudos
Message 13 of 18
(1,247 Views)
Pues, muchas gracias para la invitacion :D, lo voy a pensar !

No he probado ejecutar el programa continuamente por eso no he visto errores... Lastimamente no tengo tiempo hoy para mirarlo.
Unas dirreciones para seguir adelante :
 - Añadir las imágenes en un hmtl y guardar solo este puede ser buena idea, hay que ver si esto funciona mejor que guardar todas las imágenes a disco ; guardar ambos me parece inutil, no ?
 - Hacer este analisis despues que se acabe la adquisicion seguramente habra menos errores, por eso hay guardar a disco la señal por cada ejecution de la bucle, seguramente guardar la señal cuesta menos que guardar imágenes !
 - Otra posibilidad, hay algo en tu programa que no utiliza mas memoria que necesario... eso lo puedes ver abriendo el "task manager" durante el fucionamiento... si no veo todo el programa no puedo saber de donde viene...

intentare pensar en eso este find de 😉


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

Message 14 of 18
(1,237 Views)
Hola,

Lo siento no tuvé tiempo para este problema este fin de... Smiley Indifferent
Tuviste tiempo para arreglar todo o quedan problemas ?


We have two ears and one mouth so that we can listen twice as much as we speak.

Epictetus

Antoine Chalons

0 Kudos
Message 15 of 18
(1,221 Views)

Hola, la verdad es que sigo más o menos igual. Quiero mejorar mi programa en cuanto a consumo de CPU pero no sé como, ya que el hecho de generar imágenes gasta mucha CPU. ¿Se te ocurre algo?. Gracias.

Luz

0 Kudos
Message 16 of 18
(1,215 Views)
SPANISH
 
Hola Luz,
 
Tienes 3 opciones para salvar imagenes, a formatos JPG, PNG y BMP. Veo que estas usando PNG de momento.
 
Has probado de cablear la entrada que se llama "compression" de la funcion write png file?
 
Leo da descripcion del help (haz CRTL+H y see details)
 
compression specifies the level of file compression you want for the PNG file. Valid values range from –1 to 9 and balance file compression with speed. The following table lists example values for compression.

-1 Good compression and speed (default)
0 No compression
1 Best speed with compression
9 Best compression
 
 
Exactamente tienes que mirar lo mismo para el caso de la funcion a JPG con el valor quality:
 
quality specifies the level of quality you want for the JPEG using the IJG JPEG library scale, which ranges from 0 to 100. The default is 80. The scale balances image quality and file size. A value in the 75–95 range produces a compressed file with a high-quality image, and a value below 50 produces a smaller file size with a low-quality image
 
En cambio BMP no comprime por eso ocupa tanto espacio.
 
El tiempo que te tarda tu programa en procesar y guardar la imagen es empleado en:
1. Comprimir la imagen (algoritmo de compresion)
2.  Escribir en disco.
 
Deberias probar diversas opciones ya que por ejemplo JPG comprime mucho (mucho tiempo para comprimir la imagen), BMP no comprime (no emplea tiempo en comprimir) pero en cambio un archivo JPG es mucho mas pequenyo que uno en BMP (y por tanto ocupa mucho mas tiempo a escribirlo en disco).
 
Yo provaria las diferentes opciones con diferentes valores en el campo compression y con los diversos formatos. Tambien influye cuanto espacio puedas ocupar en disco duro y cuanta calidad necesites en la imagen.
 
Otra opcion es poner un ordenador mas potente,
 
Supongo que con esas opciones encontraras tu solucion optima.
 
Saludos,
 
Jaime Cabrera
NI Applications Engineering
 
 
 
Regards,

Jaime Cabrera

NI Applications Engineering Spain
0 Kudos
Message 17 of 18
(1,175 Views)
ENGLISH:
 
HI Luz,
 
You have 3 options to save images, to JPG, PNG and BMP formats. Right now I see u are using PNG.
 
Did u tried to wire the input called "compression" of the "write PNG file"?
 
If u open the help of that function (<ctrl>+H and then see detailes):
 
compression specifies the level of file compression you want for the PNG file. Valid values range from –1 to 9 and balance file compression with speed. The following table lists example values for compression.

-1 Good compression and speed (default)
0 No compression
1 Best speed with compression
9 Best compression
 
 
Exactly do the same with the value quality from the write JPEG file: 
 
quality specifies the level of quality you want for the JPEG using the IJG JPEG library scale, which ranges from 0 to 100. The default is 80. The scale balances image quality and file size. A value in the 75–95 range produces a compressed file with a high-quality image, and a value below 50 produces a smaller file size with a low-quality image
 
BMP does not make any compression, so thats why it needs more disk space.
 
The time that it is needed for processing and saving and image is because of 2 reasons:
1. Make the imagen compression (compression algorithm)
2.  Time needed to wirte the image into the hard drive.
 
U should try different options of that values and the different formats. For example, JPG makes a really good compression (lots of time for processing) and BMP has no compression and dont need time for that, but then JPG is much smaller in size and needs far less time to be written into the drive than a BMP that needs more space.
 
I would try different options with different formats and also with different values on the compression and quality parameters. Also u should take in consideration how much resolution and space on your hard drive u have.
 
Another option can be selecting a more powerful computer that allows a faster compression and saving to disk time.
 
I really believe with those indications u will be able to find a solution.
 
Regards.
 
Jaime Cabrera
NI Applications Engineering
Regards,

Jaime Cabrera

NI Applications Engineering Spain
0 Kudos
Message 18 of 18
(1,174 Views)