PixInsight Forum (historical)
PixInsight => Bug Reports => Topic started by: Maxi on 2009 November 02 03:01:44
-
A mi tambien me sale como a Caliu el OUT of MEMORY , menos mal que me guarde una copia de la anterior versión, no se si sera en unos ordenadores determinados o solo nos pasa a unos cuanto con la versión Windows x86 / 32 bits, ::)
Saludos, Maxi
-
Hola Maxi
Este problema —el consumo excesivo de memoria en ImageContainer— ha sido resuelto en la versión 1.5.9. Al menos, está resuelto en todas las pruebas que hemos realizado.
Por lo tanto, si sigue produciéndose, puede deberse a dos motivos:
- No hemos solucionado el problema con ImageContainer.
- El error de memoria insuficiente se produce porque durante el proceso aplicado a una imagen no hay suficiente memoria disponible, independientemente de que el trabajo se esté realizando o no con ImageContainer.
Por lo tanto, necesitaría saber varias cosas:
- El tamaño de las imágenes que estás procesando.
- El número de imágenes en ImageContainer.
- En qué momento se produce el problema, es decir cuántas imágenes puedes procesar antes de que se produzca.
- Cuánta memoria RAM libre tienes en el equipo, en el momento de ejecutar estos procesos. Escribe este comando el la consola (Processing Console):
memory
y pulsa Intro. Así verás la cantidad real de memoria que PI tiene disponible.
Gracias.
-
Hola Juan.
Me lo he vuelto a bajar de la pagina de descargas y lo he instalado de nuevo por si las moscas y ahora ya ni se habre me sale este mensaje:
(http://img25.imageshack.us/img25/2191/pierror.jpg)
Hasta ahora no habia tenido ningún problema con las anteriores versiones, tengo un ordenador del año pasado con el Vista Ultimate y 4 GB de RAM.
Saludos, Maxi
-
Hola Maxi
Necesitas instalar este paquete redistribuíble de Microsoft:
Para versiones de Windows de 32 bits:
Paquete redistribuible de Microsoft Visual C++ 2008 SP1 (x86) (http://www.microsoft.com/downloads/details.aspx?displaylang=es&FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2)
Para versiones de Windows de 64 bits:
Paquete redistribuible de Microsoft Visual C++ 2008 SP1 (x64) (http://www.microsoft.com/downloads/details.aspx?displaylang=es&FamilyID=ba9257ca-337f-4b40-8c14-157cfdffee4e)
Aparte de esto, es muy importante que mantengas tu instalación de Windows actualizada. Si no lo has hecho ya, deberías instalar Windows Vista Service Pack 2 (http://www.microsoft.com/downloads/details.aspx?displaylang=es&FamilyID=a4dd31d5-f907-4406-9012-a5c3199ea2b3), así como todas las actualizaciones disponibles para Microsoft .NET. Normalmente éstas se descargan y actualizan automáticamente si tienes la opción correspondiente habilitada.
Por otra parte, es imprescindible desinstalar PixInsight (desde el menú inicio) antes de instalar cada nueva versión. Con Windows Vista y 7 (no con XP), es necesario reiniciar el equipo después de desinstalar y antes de instalar cada nueva versión.
-
Hola Juan, he seguido los pasos que comentabas y ya va estupendamente. :)
Saludos, Maxi
-
No puedo resistirlo... ¡qué porquería de S.O.! :D
-
Hi all; near the end of the execution of the script HDRComposition, I received the out of memory warning. Therre was two Canon images oh the size above, with the memory onthe computer of 4Gb, and "Total physical memory ....... 3062.430 MB; Available physical memory ... 1543.297 MB ( 50.39%)"
Thanks
...
Full size: 4832 x 3228
Image size: 4770 x 3177
Output size: 4770 x 3177
Raw colors: 3
Filter pattern: RGGBRGGBRGGBRGGB
Daylight multipliers: 2.152106 0.923892 1.096658
Camera multipliers: 1887.000000 1086.000000 1745.000000 1086.000000
Invoking: dcraw -q 0 -k 0 -t 0 -o 0 -4
Decoding Canon EOS 50D file (4770x3177 pixels, ISO=1600, Exposure=520.00s): 100%
Loading raw image: 100%
Reading image:
D:/imágenes astronómicas/imágenes/las mejores/orion de 10-2009 bis.fit
Reading FITS: 32-bit floating point, 3 channel(s), 3410x2870 pixels: 100%
*** Warning [156]: C:/PCL/src/scripts/HDRComposition.js, line 171: assignment to undeclared variable point
PixelMath: Processing view: eagle_nebula0025
Writing swap files...
7.11 MB/s
Calculating view statistics...
Solved 1 invariant subexpression(s).
Executing PixelMath expression: combined RGB/K channels:
$T - Med(bA) + 0.05: 100%
Truncating to [0.0000000000,1.0000000000]: 100%
1.731 s
PixelMath: Processing view: orion_de_10_2009_bis
Writing swap files...
11.65 MB/s
Calculating view statistics...
Solved 1 invariant subexpression(s).
Executing PixelMath expression: combined RGB/K channels:
$T - Med(bA) + 0.05: 100%
Truncating to [0.0000000000,1.0000000000]: 100%
1.030 s
*** Error [137]: C:/PCL/src/scripts/HDRComposition.js, line 313: out of memory
------------------------------------------------------------------------------------------------------------
memory
Total physical memory ....... 3062.430 MB
Available physical memory ... 1543.297 MB ( 50.39%)
Total paged memory .......... 4096.000 MB
Available paged memory ...... 4096.000 MB (100.00%)
-
Y que lo digas Carlos, cuando tenga un rato y ganas, haber si pongo el Windows 7 que según lo que comentan es lo que tuvo que ser el Vista en su dia :sad:
Saludos, Maxi
-
I have exactly the same set up as Bosch....I've just upgraded to 4Gb ram and done the 3GB switch thing in Vista. I was surprised that I still can't get HDRComposition to combine two raw CR2 images without coming back with the 'out of memory' error. I resaved the images to FITS and tried again....just for something to try......but got the same error.
I would really love to able to use the HDRComposition script....so any help would be massively appreciated.
Cheers
Simon
-
I seem to recall that there were plans to port the script to a native PCL module, which would have much lesser memory requirements. Tried searching for «hdrcomposition pcl», «hdrcomposition native», «hdrcomposition module» and «hdr native pcl» without success ???
-
Este fin de semana pasado procesé unos 375 raws de la 5D Mark II, a 21 Gb cada archivo, de golpe, aplicando un ProcessContainer que consistia en 2 transformaciones de histograma y un ajuste de curvas a un Image Container de 375 fotos, ningún problema por el momento, los cuadros de la 5DMk2 miden 5634 x 3753 px, no he probado wavelets, pero creo que el mismo ordenador no podrá soportarlo por muy corregido que esté el bug.
Edito, el ProcessContainer ademas de los dos ajustes de histograma y de curvas también tenía un IntegerResample (:2) y un Resample manual a 1920 x 1283, después pasé un Batch Format Conversion a .jpg y también sin problemas.
-
Hola,
Pues yo tengo el problema de memoria cuando utilizo el script HDR Composition, tanto en Windows XP como en Vista de 32bits, con un ordenador dual core con 2Gb de RAM y PixInsight 1.5.9, a pesar de haber actualizado los SO con los últimos SP disponibles y de haber instalado el paquete redistribuible de Visual C++ que recomienda Juan.
Saludos,
Sergi
-
All you need is a lot of RAM. Juan always recomended a minimum of 8 GB of RAM, or 16 better.
-
Even when doing an HDRComposition of only two images? Surely 4Gb is enough for that?
-
Hi,
this is also what is worrying me: Sometimes it seems that an image that should consume something like 50 MBytes at most (full Canon CR2 RGB converted to float) causes an out of memory despite the fact that Windows still reports 500 MBytes available. This should not happen. But it still does happen after upgrading from 2 GBytes RAM to 3 GBytes, although less frequently. Either PI or Windows are playing us bad tricks here.
Georg
-
Hi Carlos,
I appreciate your comments but I disagree in the solution you are proposing.
On one hand, as far as I know, a 32-bit OS can only address 2Gb of memory, so it would be useless to install that huge amount of RAM.
On the other hand, if this proplem happens when the script is run just with 2 DSLR images resampled to 32 bit depth, no other images open in PixInsight and no other applications running on the computer, it's likely to be due to a memory management inefficiency, not to lack of memory resources.
Cheers,
Sergi
-
Hola Sergi
Pues yo tengo el problema de memoria cuando utilizo el script HDR Composition, tanto en Windows XP como en Vista de 32bits, con un ordenador dual core con 2Gb de RAM y PixInsight 1.5.9, a pesar de haber actualizado los SO con los últimos SP disponibles y de haber instalado el paquete redistribuible de Visual C++ que recomienda Juan.
El problema aquí es el script HDRComposition. No es que no funcione, que lo hace excepcionalmente bien, sino que tiene unos requerimientos de memoria ciertamente muy exagerados. Las razones tienen que ver con el hecho de que, de por sí, las transformaciones de wavelets que se utilizan requieren mucha memoria (cada capa es un duplicado de la imagen en 32 bits), y además, sobre todo, que el motor de JavaScript es problemático con el uso de la memoria. Es muy probable que se pueda optimizar el script para reducir el consumo de memoria, pero de momento no lo hemos hecho por falta de tiempo. Trataré de echarle un vistazo lo antes posible.
La solución, como ha apuntado David, es implementar este algoritmo en C++ como un módulo independiente. Esto es urgente, dada la importancia de esta tarea, pero en este momento no me es posible acometerla por falta de tiempo. Básicamente en este momento todo el tiempo lo estoy dedicando a realizar nuevos videotutoriales, lo cual es la máxima prioridad ahora.
Así que paciencia, esto se solucionará y tendremos el mejor sistema de composición HDR con un consumo de memoria razonable, pero las prioridades son las prioridades, y yo sólo soy uno, y mis días son de entre 12 y 20 horas laborables. Esto es lo que hay :)
-
On one hand, as far as I know, a 32-bit OS can only address 2Gb of memory, so it would be useless to install that huge amount of RAM.
A 32-bit OS addresses 4 GB or memory. Normally, about one GB is required for the operating system kernel and core services. Then we can have about 3 GB left for applications.
An important part of the problem here is Windows. By default, the 32-bit versions of Windows (including XP, Vista and 7) can only use 2 GB for applications. Fortunately, this can be improved. To use 3 GB for applications, you must edit the BOOT.INI system file and add a /3GB flag. This is documented in Microsoft's MSDN website:
http://msdn.microsoft.com/en-us/library/ms791558.aspx
I found also a blog entry with very interesting information and step-by-step procedures:
http://dwf.blogs.com/beyond_the_paper/2009/04/enabling-3gb-switch-on-windows-vista.html
PixInsight Standard for Windows 32-bit can make use of the 3 GB when available, as it, along with all standard process modules, has been linked with the IMAGE_FILE_LARGE_ADDRESS_AWARE flag enabled. The old PixInsight LE application can only address 2 GB.
Disclaimer: Always be aware that changing system configuration files is a risky task. If you make a mistake, your computer may not be able to boot. Be careful, and do it at your own risk.
Having said all that, I must say that, in my opinion, 2 or 3 GB of RAM is too small for any serious image processing. My general recommendation is:
- A 64-bit operating system and a 64-bit version of PixInsight.
- At least 6 GB of RAM. Much better 8 GB.
- At least 2 physical drives dedicated to swap file storage, either running in parallel with PixInsight's parallel disk access option enabled (Preferences), or mounted as a RAID 0 unit.
For large mosaic construction and large HDR compositions, I'd recommend 16 GB of RAM.
Recently I have been making successful experiments with the tmpfs filesystem on Linux. It works like a RAM disk out-of-the-box (no additional software required), and it if f*a*s*t indeed :)
-
Gracias por la aclaración Juan ;)
Simplemente con saber que el asunto no se da por resuelto y que se acometerá su resolución en cuanto sea posible me doy por satisfecho :D
Cada vez me planteo mas seriamente la posibilidad de disparar tomas cortas en cualquier tipo de objeto sin que sean los clásicos M42 o M31. Con DSLRs el rango dinámico es escaso y de esta forma podría recuperar las estrellas fácilmente.
También te agradezco la aclaración sobre la capacidad de direccionamiento de memoria de un SO de 32 bits, obviamente yo había confundido esta capacidad con la asignación que Windows hace para aplicaciones, tal y como tú explicas.
Saludos,
Sergi
Hola Sergi
Pues yo tengo el problema de memoria cuando utilizo el script HDR Composition, tanto en Windows XP como en Vista de 32bits, con un ordenador dual core con 2Gb de RAM y PixInsight 1.5.9, a pesar de haber actualizado los SO con los últimos SP disponibles y de haber instalado el paquete redistribuible de Visual C++ que recomienda Juan.
El problema aquí es el script HDRComposition. No es que no funcione, que lo hace excepcionalmente bien, sino que tiene unos requerimientos de memoria ciertamente muy exagerados. Las razones tienen que ver con el hecho de que, de por sí, las transformaciones de wavelets que se utilizan requieren mucha memoria (cada capa es un duplicado de la imagen en 32 bits), y además, sobre todo, que el motor de JavaScript es problemático con el uso de la memoria. Es muy probable que se pueda optimizar el script para reducir el consumo de memoria, pero de momento no lo hemos hecho por falta de tiempo. Trataré de echarle un vistazo lo antes posible.
La solución, como ha apuntado David, es implementar este algoritmo en C++ como un módulo independiente. Esto es urgente, dada la importancia de esta tarea, pero en este momento no me es posible acometerla por falta de tiempo. Básicamente en este momento todo el tiempo lo estoy dedicando a realizar nuevos videotutoriales, lo cual es la máxima prioridad ahora.
Así que paciencia, esto se solucionará y tendremos el mejor sistema de composición HDR con un consumo de memoria razonable, pero las prioridades son las prioridades, y yo sólo soy uno, y mis días son de entre 12 y 20 horas laborables. Esto es lo que hay :)
-
More memory problems here...
I was trying to build a 2x2 mosaic (each 32b TIFF is around 14mb, 4000x2600 pixels in size +/-).
I combined the first two panes ok. I balanced them successfully with PixelMath... I was happy.
When combining the third pane with the combination of the first two, it took 17 attempts to find a valid set of pair matches, and when it went for the #18 it indicated it would use 12000 stars, and shortly after that I've got the dreadful "Out of Memory" message.
I tried limiting the maximum number of stars to 2000, but then a match couldn't be found.
Then I tried 5000, 8000, 10000... Same results.
One thing I noticed is that eventually I would get the "Out of memory" when it starts the structure map, at 2%. Then I would close PI, restart it, load the two images, set the same parameters, execute it, and then it will finish the structure map and all, and get the out of memory message after the X try. After several tries with different "maximum stars", the out of memory error would happen again at the 2% of building the structure map, and again, the only cure for that is to restart the program. So besides running into a "real" memory problem, I think there's a bug somewhere. I can be very detailed about the steps to reproduce the problem if needed.
I have also had out of memory problems using the HRDComposite in the past, to the point of giving up on that.
Win32 XP w/2GB RAM.
-
Nota: Dado el interés que tiene este tema y los problemas que plantea Rogelio, hemos decidido hacer la traducción de la respuesta original al Español. Versión en Español al final.
Hi Rogelio,
You have two different problems here:
Win32 XP w/2GB RAM.
When combining the third pane with the combination of the first two, it took 17 attempts to find a valid set of pair matches, and when it went for the #18 it indicated it would use 12000 stars ...
I have good news and bad news. The good news is that both problems have very easy solutions. The bad news is that the solution to the first problem will cost you money. Let's analyze the facts.
The bad news first. We need a little arithmetic. Your mosaic frames are 4000x2600 pixels in size (roughly). They are 32-bit images (either floating point or integer). Since you use a STL 11K camera (your image geometry confirms that), I assume you're working with RGB color images (3 channels). Then we have:
Amount of RAM required for one image: 4000x2600x4x3 -> 119 MB
Probable amount of RAM required for a 4-frame mosaic, taking into account rotation of mosaic frames -> 500 MB
Note that we are neglecting all auxiliary and control data structures, as image window and view objects, screen bitmaps, lookup tables and buffers, statistics, histograms, and quite a bunch of complex data structures that PI uses internally for each image.
Note also that unless you're building a one-row mosaic, the amount of memory required to store a 3-frame mosaic and a 4-frame mosaic is roughly the same (the only difference is in the additional room required to rotate the fourth frame). So you need 500 MB allocated in three contiguous chunks of some 167 MB to generate your 3-frame mosaic.
Let's make a step-by-step description of what you do to build your mosaic:
1. You turn on your computer. Windows XP 32-bit reserves approximately one gigabyte for its own use, including its kernel and all core services and device drivers. It can be somewhat less or more, depending on how you have configured your system. Then your firewall/antivirus program is loaded and executed (because you're running one, aren't you?). It will consume some memory, depending on the particular application you're using. If you have other applications or services configured to run at startup, they will also need some additional memory. Both your antivirus/firewall and the rest of resident applications will reduce the amount of free RAM available to applications.
2. You execute the PixInsight Core application. As of version 1.5.9.561, the 64-bit version of PixInsight Core for Linux (the reference implementation) has a RAM footprint of approximately 100 MB. I haven't measured the footprint on Windows 32-bit, but it should be similar.
3. You open your first two mosaic frames. This consumes roughly 240 MB of RAM.
4. You generate a two-frame mosaic. This is another 240 MB.
5. Of course, you close your two first mosaic frames, to save memory. This frees six contiguous chunks of 40 MB each, one for each channel of your first two mosaic frames. Note, however, that the six chunks won't form, in general, a contiguous hole of 240 MB. This is known as memory fragmentation, and is a problem inherent to all dynamic allocation systems.
6. You open your third mosaic frame. It occupies three of the 40 MB chunks that you freed in step 5. This is 120 MB.
7. You launch StarAlignment again to generate a 3-frame mosaic. Your mosaic requires three free contiguous holes of some 165 MB each, or a total of some 500 MB.
8. You get an out of memory error because Windows XP 32-bit won't allow an application to allocate 900 MB of physical RAM in a system where the maximum RAM available to applications is less than 1 GB. End of the story.
Let me introduce Vega to you. Vega is our physical Windows test machine here at our office (we have other Windows machines, but all of them are virtual ones). It is a nicely built Intel Core 2 6300 @ 1.86 GHz with 2 GB of RAM. It is, by today's standards, how to say, not at the bleeding edge of technology. Vega runs Windows Vista Business x64 up-to-date with SP2 installed.
Below you have a screenshot that shows Vega's main screen after building not one, neither two but three mosaics even larger than your mosaic. And it has only 2 GB of RAM:
http://forum-images.pixinsight.com/legacy/mosaic_64/mosaic_64-1.png
If you don't trust me, here's a screenshot with the task manager open (sorry, it's in Spanish):
http://forum-images.pixinsight.com/legacy/mosaic_64/mosaic_64-2.png
Note also that there are two instances of PixInsight running. I used the other instance to copy and save the screenshot images.
The mosaics are composed of two 64-bit floating point images of 4000x4000 pixels each. Each mosaic requires some 743 MB of RAM as you see. On the above screenshot, the first instance of PixInsight is using 3 GB of RAM, just to store pixel data. Of course, a lot of disk swapping is necessary to achieve that. Vega has an enterprise-class Western Digital 750 GB SATA disk. After completing the second mosaic, the PixInsight Core application was perfectly responsive. After the third mosaic and a few minutes waiting for Vista to stabilize, it was usable although the GUI was somewhat slow. Vista's pagefile.sys file was about 4 GB at this point.
This is just to demonstrate you the power of a 64-bit operating system. The 64-bit version of PixInsight has no practical memory limits, other than the fact that when you have consumed your physical RAM, a lot of disk swapping is necessary, and that slows down everything.
So my advice is to buy or build a new computer. Throw a minimum of 8 GB on a modern and efficient motherboard with at least a quad-core processor and install a 64-bit operating system. If you insist in using Windows, buy a license of Windows 7 x64.
In the meanwhile, you can build your mosaic with 16-bit integer images on your WinXP32/2GB machine without problems (once you've solved the second issue, see below).
=======================
Now your second problem. This is very easy to fix, and I explain how in my third video on mosaic construction (which I'm going to continue working on as soon as I finish this post).
You just have to define two previews: one on your 2-frame mosaic image and one on your third mosaic frame. Each preview must cover (roughly) the overlapped area between both images. Then select the mosaic's preview as the reference image in StarAlignment, and apply it to the frame's preview. The mosaic in the above screenshot has been generated in this way, as it has minimal overlapping (< 2%).
When StarAlignment is executed on previews, it looks for star pair matches on the areas covered by the previews, but performs the image registration on the previews' parent images. This system allows us to build huge mosaics with no practical limit. For example, the two-frame mosaic that you can see on the screenshots above is part of a 256-megapixel, 16-frame mosaic.
StarAlignment has been designed for maximum registration accuracy, not as a "throw me anything and I'll align it anyway" system.
Sorry for being a bit technical, but there's no other way to explain this. StarAlignment's star pair matching system requires the number of outliers (false pair matches) in the initial set of putative star pair matches to be not too large. This is because the registration model (an eight-parameter homography) is computed with a special implementation of the RANSAC algorithm. RANSAC ensures that no false star match will enter the registration model, which greatly improves accuracy. However, RANSAC is sensitive to a large number of outliers in its input set. To overcome this limitation with a minimal user intervention, I designed and implemented the preview-based registration model that I've described in the preceding paragraphs.
As I've said I describe all of this in detail in the third video. Let me know if you need further information.
====================================================================
Hola Rogelio,
Tienes dos problemas diferentes aquí:
Win32 XP w/2GB RAM.
When combining the third pane with the combination of the first two, it took 17 attempts to find a valid set of pair matches, and when it went for the #18 it indicated it would use 12000 stars ...
Tengo buenas y malas noticias. La buena noticia es que ambos problemas tienen soluciones muy sencillas. La mala noticia es que la solución al primer problema te costará dinero. Analicemos los hechos.
Primero las malas noticias. Necesitamos un poco de artmética. Cada uno de los elementos de tu mosaico tiene 4000x2600 pixels (más o menos). Son imágenes de 32 bits (enteras o en punto flotante). Como usas una cámara STL 11K (la geometría de tus imágenes lo confirma), asumo que estás trabajando con imágenes RGB en color (3 canales). Entonces tenemos:
Cantidad de RAM necesaria para una imagen: 4000x2600x4x3 -> 119 MB
Cantidad probable de RAM necesaria para un mosaico de 4 elementos, teniendo en cuenta la rotación de los elementos del mosaico -> 500 MB
Ten en cuenta que estamos pasando por alto todas las estructuras auxiliares de control, como las ventanas de imagen, las vistas, los bitmaps de pantalla, las tablas lookup y los buffers, los histogramas, estadísticas y un buen puñado de estructuras de datos que PI usa internamente para cada imagen.
Ten en cuenta también que a menos que estés construyendo un mosaico de una fila, la cantidad de memoria necesaria para almacenar un mosaico de tres elementos es la misma, aproximadamente, que la que se necesita para un mosaico de cuatro elementos (la única diferencia es el espacio adicional necesario para girar el cuarto elemento). De manera que necesitas 500 MB ubicados en tres bloques contiguos de memoria de unos 167 MB cada uno para generar tu mosaico de tres elementos.
Hagamos una descripción paso a paso de lo que haces para construir tu mosaico:
1. Enciendes tu ordenador. Windows XP de 32 bits reserva aproximadamente un gigabyte para su propio uso, incluyendo el kernel y los servicios del mismo, así como todos los controladores de dispositivo. Puede ser algo más o algo menos, dependiendo de cómo tengas configurado tu sistema. Entonces tu programa de firewall/antivirus es cargado y ejecutado (porque estás usando uno, ¿verdad?). Consume alguna memoria, dependiendo de la aplicación en particular que estés usando. Si tienes otras aplicaciones o servicios configurados para ejecutarse en el inicio, también van a necesitar alguna memoria. Tanto tu antivirus/firewal como el resto de las aplicaciones residentes van a reducir la cantidad de memoria libre disponible para las aplicaciones.
2. Ejecutas la aplicación PixInsight Core. La versión 1.5.9.561 de 64 bits de PixInsight Core para Linux (la implementación de referencia) tiene un "footprint" en RAM de aproximadamente 100 MB. No he medido el footprint en Windows de 32 bits, pero debería ser similar.
3. Abres los dos primeros elementos de tu mosaico. Esto consume unos 240 MB de RAM.
4. Generas el primer mosaico de dos elementos. Esto supone otros 240 MB.
5. Por supuesto, ahora cierras los dos primeros elementos del mosaico, para ahorrar memoria. Esto libera seis bloques contiguos de 40 MB cada uno, uno para cada canal de tus dos primeros elementos de mosaico. Ten en cuenta, sin embargo, que estos seis bloques no van a formar, necesariamente, un agujero de 240 MB contiguos. Esto se conoce como fragmentación de memoria, y es un problema inherente a todos los sistemas que realizan ubicación dinámica.
6. Ahora abres el tercer elemento del mosaico. Ocupa tres de los bloques de 40 MB que has liberado en el paso 5. Esto son 120 MB.
7. Lanzas StarAlignment de nuevo para generar un mosaico de tres elementos. Tu mosaico requiere tres agujeros de unos 165 MB contiguos cada uno, o un total de unos 500 MB.
8. Recibes un error de falta de memoria porque Windows XP de 32 bits no va a permitir que una aplicación ubique 900 MB de RAM física en un sistema donde la cantidad máxima de RAM disponible para aplicaciones está por debajo de 1 GB. Fin de la historia.
Permíteme que te presente a Vega. Vega es nuestra máquina física para pruebas con Windows aquí en nuestra oficina (tenemos otras máquinas de Windows, pero todas son virtuales). Es una máquina muy bien construida con un Intel Core 2 6300 a 1.86 GHz con 2 GB de RAM. Se trata de una máquina que para los estándares actuales, cómo decirlo, no está al filo de la tecnología precisamente. Vega corre Windows Vista Business x64 actualizado con SP2 instalado.
A continuación tienes una copia de pantalla que muestra la pantalla principal de Vega tras haber construido no uno, ni dos, sino tres mosaicos más grandes que el tuyo. Y sólo tiene 2 GB de RAM:
http://forum-images.pixinsight.com/legacy/mosaic_64/mosaic_64-1.png
Si no me crees, aquí tienes una copia de pantalla con el administrador de tareas de Wndows abierto:
http://forum-images.pixinsight.com/legacy/mosaic_64/mosaic_64-2.png
Ten en cuenta también que hay dos instancias de PixInsight en ejecución. Usé la otra instancia para copiar y guardar las copias de pantalla.
Los mosaicos están compuestos por dos imágenes de 64 bits en punto flotante de unos 4000x4000 píxeles cada una. Cada mosaico requiere unos 743 MB de RAM como puedes ver. En la copia de pantalla anterior, la primera instancia de PixInsight está utilizando 3 GB de RAM, tan sólo para almacenar datos de píxel. Por supuesto, es necesario mucho intercambio de datos en disco para conseguir esto. Vega monta un disco SATA Western Digital de clase enterprise de 750 GB. Tras completar el segundo mosaico, la aplicación PixInsight Core era perfectamente utilizable. Tras el tercer mosaico, y después de esperar unos minutos hasta que Vista se estabilizara, era también utilizable aunque la interfaz gráfica iba algo lenta. El archivo pagefile.sys de Vista tenía unos 4 GB en este momento.
Esto es sólo para demostrarte la potencia de un sistema operativo de 64 bits. La versión de 64 bits de PixInsight no tiene límite práctico de memoria, aparte del hecho de que cuando se consume la RAM física es necesario mucho intercambio con los discos, lo cual enlentece todo en gran medida.
Así que mi consejo es que compres o construyas un nuevo ordenador. Pon un mínimo de 8 GB en una placa base moderna y eficiente con al menos un procesador quad-core e instala un sistema operativo de 64 bits. Si insistes en usar Windows, compra una licencia de Windows 7 x64.
Mientras tanto, puedes construir tu mosaico sin problemas con imágenes de 16 bits en tu máquina WinXP32/2GB (una vez que hayas resuelto el segundo problema, lee más abajo).
=======================
Ahora tu segundo problema. Éste es muy fácil de resolver, y explico cómo hacerlo en mi tercer vídeo sobre construcción de mosaicos (el cual voy a continuar haciendo tan pronto como termine este mensaje).
Tan sólo tienes que definir dos previsualizaciones (previews): una para tu mosaico de dos elementos, y otra para el tercer elemento de tu mosaico. Cada previsualización debe cubrir (más o menos) el área de superposición entre ambas imágenes. Entonces selecciona la previsualización del mosaico como la imagen de referencia de StarAlignment, y aplícalo a la previsualización del tercer elemento del mosaico. El mosaico de las copias de pantalla anteriores ha sido generado de esta manera, ya que tiene una mínima superposición (< 2%).
Cuando StarAlignment es ejecutado sobre previsualizaciones, busca parejas de estrellas coincidentes en las áreas cubiertas por las previsualizaciones, pero lleva a cabo el registro de las imágenes madre de las mismas. Este sistema nos permite construir mosaicos enormes sin límite práctico. Por ejemplo, el mosaico de dos elementos que puedes ver en las copias de pantalla anteriores forma parte de un mosaico de 256 megapíxeles y 16 elementos.
StarAlignment ha sido diseñado para la máxima precisión de registro, no como un sistema del tipo "échame cualquier cosa y yo la alinearé sea como sea".
Perdón por ser un poco técnico, pero no hay otra forma de explicar esto. El sistema de emparejamiento de estrellas de StarAlignment requiere que el número de outliers (falsas parejas) en el conjunto inicial de parejas coincidentes de estrellas no sea demasiado grande. Esto es porque el modelo de registro (una homografía con 8 parámetros) es calculado con una implementación especial del algoritmo RANSAC. RANSAC asegura que ninguna falsa pareja de estrellas entrará en el modelo de registro, lo cual aumenta la precisión considerablemente. Sin embargo, RANSAC es sensible a un gran número de outliers en su conjunto de entrada. Para superar este problema con una intervención mínima del usuario, diseñé e implementé el modelo de registro basado en previsualizaciones que he descrito en los párrafos anteriores.
Como he dicho voy a describir todo esto en el tercer vídeo. Dime si necesitas más información.
-
Hi Juan,
thanks for this very helpful discussion of the memory problem!
I guess always assumed that PI was using its swap directory (Edit/Global Preferences/Directories and Network) to unload images that are currently not used. So what is the PI swap directory used for?
Georg
-
Hi Georg,
Thanks. In PixInsight, swap files are used for temporary storage of image states. When you apply a process that modifies an image's pixel contents, the current image is saved as a swap file (or as a set of swap files if you're using parallel swap file access with several physical drives). When you eventually undo the applied process, or if you navigate the image's processing history, the swap file is reloaded from disk when necessary. In this way PixInsight has unlimited undo/redo capabilities, disk space permitting.
Sending unused images to swap files is something I've considered. For example, iconized images could be handled in this way. In fact, implementing this wouldn't be very difficult because all required components are already available in the core application. So far I haven't decided to implement this functionality for performance reasons, but given that we have parallel disk i/o now, perhaps I'll reconsider it. Don't expect miracles from this technique, though. For example, the mosaic problem that we've discussed wouldn't improve, as all images are actually necessary to build the mosaic. So 64-bit rules! :)
-
Hi Juan
So 64-bit rules!
I have to agree - I just installed an extra 4Gb of RAM, taking my total up to 8Gb on Vista64 - its just like adding a shot of Nitrous Oxide to the system. Worth every penny spent - I just wish I had done it a few months ago, when memory prices had been so much lower.
But it was still a great move.
Cheers,
-
Gracias Juan for your detailed answer.
Spanish usually is not a problem for me ;-)
I do plan to get a new computer this xmas, not particularly to avoid this memory problem but for performance in general. For the 3x4 mosaic I did not long ago with the California nebula and the Pleiades, I had to reduce the files in half at the very beginning so that I could actually work without waiting 5 minutes after every little thing I did (not limited to PI btw).
BTW I like the "trick" of using previews, I'll try that next time! ;)
"If you insist in using Windows..."
You don't want to get me started on Windows, Microsoft, etc. ;D 13 years ago I was working for a startup called Netscape. Need I say more? O0 I actually have two computers at home running Linux (one's our "gateway", the other one is for my kids), but still, there's a large number of apps I use that are only available in Windows, so that's what I have in my main desktop.
-
Hola Juan,
Tengo problemas de "Out of memory" haciendo simplemente un StarAlignment con 3 imágenes monocromas tomando una de ellas como referencia.
Esto no me había pasado con versiones previas que había evaluado antes de comprar la licencia y usar la versión 1.5.9.0553.
Saludos,
Sergi
Edito:
No me había dado cuenta de algo importante y es justo que lo comente.
Hace unos días estuve haciendo unas pruebas de drizzlex2 con mi programa de apilado. Al apilar las imágenes monocromas de las que hablaba no me había dado cuenta que la opción drizzlex2 seguía activa, por lo que las imágenes eran 4 veces mas grandes que la resolución original. Aún así, al ser de 16bits de profundidad, ocupan poco mas que una imagen a color a la resolución original.