Debayer Module 1.1 available for Windows 32bit

Nocturnal

Well-known member
Hi,

I published an update for the Debayer module. The big change is that Bilinear Interpolation is now implemented. Oh, multi thread support is pretty big too :) Luckily the module still runs pretty quickly on my rather mediocre P4D@3G. Note how large the file is. Some super-duper sensor someone is evaluating and I helped getting it debayered:

Code:
Reading 1 file(s):
C:/temp/sun_lot_8x_filter.fit
Reading FITS: 16-bit integers, 1 channel(s), 7344x5494 pixels: 100%

FastRotation: Processing view: sun_lot_8x_filter
Writing swap files...
40.10 MB/s
Vertical mirror: 100%
0.109 s

Debayer: Processing view: sun_lot_8x_filter
* Using 2 logical processors.
Bilinear Debayering: 100%
2.012 s

Get further details and download link here: http://www.tungstentech.com/Software/PixInsightModules/tabid/79/Default.aspx

Bug reports are welcomed.
 
Hi Juan,

thanks! I'm glad I finally bit the bullet and got started with PCL. It's a lot of fun. You wrote a wonderful platform that allows these types of extensions.

All,

There was a problem with the download link in the page above. It's fixed now but if you want just the module, here it is:

http://www.tungstentech.com/Portals/0/downloads/Debayer-pxm.zip
 
Hi Sander:
I installed the file .dll in the bin folder, but it not displayed in the menu ETC.
I restart the PC and continuing the same.

cqs1241026287c.gif


Best regards.
ManoloL
 
Hi Manolo,

I guess PI only installs signed modules. Does it say anything in the processing console when PI starts?

For now please use the module import feature in PI to add it. You may want to move the DLL to another directory so PI doesn't get confused.
 
Great, let me know how it goes Sergio! Testing was limited to images I had on hand so please feel free to hammer it and tell me what broke :)
 
Nocturnal said:
Hi Manolo,

I guess PI only installs signed modules. Does it say anything in the processing console when PI starts?

For now please use the module import feature in PI to add it. You may want to move the DLL to another directory so PI doesn't get confused.

Hi Sander:
I had to put the file in the folder C:\ PCL\ bin
If you put the file in another directory, Pixie did not recognize it.
Finally it is installed.

jdv1241035053z.gif


Thank you.

Best regards
 
Hi Manolo,

during development the module gets copied into c:\pcl\dist\.... and that works fine but the module needs to be installed first. I've added a note to that effect to my web page.

At some point Juan and I may want to figure out a way to make module install easier. Let's first get some more 3rd party modules though :)
 
Hi Sander, Manolo,

Unless you've disabled the corresponding global security option (Edit > Security Settings > Allow development module versions), PI will install development modules (that is, modules that don't declare a unique id) without problems. The module can be on any location. Do the following:

- Select Process > Modules > Install Modules.

- On the Install Modules dialog, the search directory is the bin installation folder by default. If you have the module on a different folder, click the Browse button and select it.

- Click the Search button. If the module is on the selected search directory, PI will find it.

- There is a bug in version 1.4.x that leads to a crash if you click on the module name. So don't click it; Just click the Install button.

That's all, the module should install fine.

============================================

A no ser que hayas desactivado la opci?n de seguridad correspondiente (Edit > Security Settings > Allow development module versions), PI instalar? m?dulos de desarrollo (o sea, m?dulos que no declaran un identificador ?nico) sin problemas. El archivo del m?dulo puede estar en cualquier lugar. Haz lo siguiente:

- Selecciona Process > Modules > Install Modules

- En el di?logo Install Modules, el directorio de b?squeda (search directory) es por defecto la carpeta bin de instalaci?n. Si tienes el m?dulo en una carpeta diferente, haz clic en el bot?n Browse y selecci?nala.

- Haz clic en el bot?n Search. Si el m?dulo est? en la carpeta de b?squeda seleccionada, PI lo encontrar?.

- Hay un bug en la versi?n 1.4.x que produce un crash si haces clic sobre el nombre del m?dulo. S?lo haz clic en el bot?n Install.

Eso es todo, el m?dulo deber?a instalarse sin problemas.
 
Hi Juan!

I've follow your steps to install de new module. Finally I was able to do it, but copying the module to the /bin folder. First I tried to install from the folder /PCL/Nueva Carpeta but PI didn't find the module  :D

Sergio

Edit: I can't work with the new module with my CANON DSLR Raw files. I search in the format explorer to avoid any conversion, but the option without interpolation creates a RGB image. Is there any option to load my images as b&w images?
 
The module works as advertised  :)

Here a mosaic of all result  with the different output options. It's curious the bright red pixels in the border the B2 cell (in B3 removing those pixels.

In A3 is with superpixel option.

Last mosaic is between PI default RAW conversion and this module. Are identical.

Sergio

 

Attachments

  • ALLBAYER.jpg
    ALLBAYER.jpg
    31.3 KB · Views: 53
  • COMPARA.jpg
    COMPARA.jpg
    11.1 KB · Views: 48
Hi,

thanks for trying this out and posting your results. Could you please upload the source image and the .psm of the debayered version somewhere? With bilinear debayering the outside edge can not be properly colored so I leave the edge black. Well, that's the intent anyway. Let me have a look at the code and make sure I explicitly set the outside pixels to 0,0,0.
 
Hi Sander,

I found that, for my deBayer routine, leaving the outside edges at ANY 'fixed colour' gave me some really nasty 'skewed results' when it came to looking at the Histogram, etc.

In my opinion you have two 'better' choices :-

Either
a) issue a 'crop outer ring of pixels' command, or
b) perform a 'nearest neighbour interpolation' algorithm on the outer edge, and corners.

I have implemented (b) in my JSR version - it seems to work quite well. I average the three 'closest' pixels - e.g. below left, below and below right, for the missing 'top' row, and do the same thing for the other three edges. For the corners, I average the nearest three again - because I now have 'edge data' for the corners.

However, there is quite a good argument to just 'throw away' the edge data altogether (i.e. the 'crop' method) - because it is going to be noisy anyway, and because you are probably going to run a Dynamic Crop to eliminate pixel shift resulting from 'dithered' stacking (intentional, or otherwise !!)

But, and this is my point, it is nice to have 'done away' with these solid-colour edges - simply because Histograms of images WITH these edges simply 'look nasty' (even STFs are 'not nice')

That said, some users may not understand 'why' their precious images have 'shrunk' by two pixels all round.

Maybe a GUI option might be the best solution?

Cheers,
 
Nocturnal said:
Hi,

thanks for trying this out and posting your results. Could you please upload the source image and the .psm of the debayered version somewhere? With bilinear debayering the outside edge can not be properly colored so I leave the edge black. Well, that's the intent anyway. Let me have a look at the code and make sure I explicitly set the outside pixels to 0,0,0.

Will reproduce the results again, haven't saved the psm files.


About Niall's suggestion, I'd rather go with b) option, but a) seems easy :D

Sergio
 
I agree that the histogram isn't pleasant in the way I implemented it now. I'll see what I can do to improve this without killing performance.
 
Hi,

I updated the module. It now copies adjacent pixels into the outer edge.

http://www.tungstentech.com/Portals/0/downloads/Debayer-pxm.zip

No linux version yet. I don't think anyone downloaded it.
 
No linux version yet. I don't think anyone downloaded it.

Just wait to 1.5 being released, and you'll have a couple downloads of the Linux version, guaranteed! :D

Seriously now, I think you're doing an excellent work, and I am really glad with your first PCL adventures. That's what PI is designed to be: a platform, not just an application!

When you feel this module is reasonably stable (which I think it is now) and feature-complete, we can talk about porting it to Mac OS X if you want. It would be very nice. And the Linux versions are important too, even if the (momentary) lack of downloads may seem discouraging (I could tell you something about discouraging attitudes toward one's software ;D).
 
Hi Juan,

thanks for the encouragement. I'm also very happy to have finally started with PCL programming. It's a lot of fun. I started with C++ many years ago when it was still a pre-precessor for c. Only recently have I picked it up again including some CLR C++ with VS 2008. I have to say that templates are still a bit voodoo to me though. Inheritance and polymorphism are much easier to understand but I get the performance benefits of using templates instead.

Anyway, there are few more things to square away with the module including getting the name of the source image and then I can send you the source for building on all the supported platforms. After 1.5 goes out, of course :)
 
Back
Top