PDA

View Full Version : Debayering - Still a bit confused



flyer
April 25, 2012, 05:42:58
Stefan,

I am starting a new thread because I think I'm not the only person with questions about this subject. In an earlier post you indicated that "BG" was/is the correct patter to use for DeBayering after capturing Y800/Y800. And, indeed, when turning Debayering "on" within the IS capture program, "BG" shows the correct and expected color.

However, in testing 4 different DeBayering programs after capturing the raw uncolored video, I need to select a different pattern to see correct color. This has me confused!

According to what I read the ICX204 CCD has a "GB" Bayer pattern, so why "BG" in IS Capture?

Here are the results of a test I ran today with both my DBK31AU03 and DBK21AU618:

Image 1 shows the capture software, and the Bayer pattern needed to show the correct colors.

Image 2 shows the Bayer pattern needed within AstroStakkert2 ("GBRG")

Image 3 shows the Bayer pattern needed within FireCaptureDebayer Tool: ("RG" for bilinear, "GB" for adaptive smooth)

Image 4 shows Registax 5 needing "GB" (Registax 6 is the same)

VirtualDub DeBayer filter plugin does not allow selection of the Bayer pattern but gives correct color on output.

I would really appreciate it if you could clear this up for me!

I think this demonstrates why you might further consider developing an IS tool to get the Debayering done properly.

Thanks,

Peter

1488
1489
1490

flyer
April 25, 2012, 05:45:31
final attachment1491

Stefan Geissler
April 25, 2012, 09:17:39
Hi Flyer,

Photography with raw data is a complex theme. Handling with different programs can advance complexity.

However, If you choose a color format, e.g. BY8 as video format of the camera and RGB24 as "codec" for AVI capture, then you receive colored AVI files. Current computers should be able to handle the three times bigger files than Y800 AVI files. This should solve the problem.

Also in this forum is a very simple application "ICY800Capture" for download (http://www.theimagingsourceforums.com/showthread.php?323863-We-Need-a-Crosshair-for-IC-Capture&highlight=ICY800Capture). It has less possibilities than IC Capture, shows a colored live view and saves Y800 videos. The user has no possibilities to change anything in there, except camera parameters.

flyer
April 25, 2012, 14:38:41
Hello Stefan,

I appreciate your reply. I was aware of the ICY800 program. It is very nice but not much use for planet captures since there is no way to select ROI. Capturing full frame video can fill a hard drive pretty quickly, and it puts additional stress on the computer, and particularly puts stress on the USB port which in my case is shared with software driving the mount. Again, I don't mean to sound negative, I'm just beingt realistic for my particular situation.

Yes, certainly I could just capture colored avi files using BY8/RGB24, but if I'm not mistaken is this not limited to 30fps captures? One of the appealing functions of the DBK21AU618 is the ability to capture 60fps, so on the brighter planets it is all about getting the most frames in the shortest time!

I notice that you have not answered my question about the need for Debayering patterns different from what you indicated one should use, namely "BG." In a way I am glad that you are not answering this question because it rather validates my point that the issue of Debayering after capture is not nearly as straight forward as might be hoped for.

This is pure speculation on my part. I read somewhere (towards the end of the replies) in a post I put on this forum about a year ago about a "New Debayering method" that there is a directshow codec that is installed as part of the IS Capture program, and that this codec is what allows the color to be displayed within the program pre-capture. Is it possible that there is a mistake in this codec? What I mean is this. The CCD manufacturer indicates that the pattern is "GB," and all the programs I tested seem to work properly using "GB" (with the exception of FireCapture which uses "RG" for bilinear DeBayering, but "GB" for the others. The author of this program has stated that his program may not work properly with IS cameras). So, that appears to leaves only the capture program showing "BG" as the correct DeBayer pattern. Maybe it is a simple codec error that could be corrected. That in itself would eliminate a lot of confusion!


I continue to lobby for Imaging Source to develop a DeBayering Tool made specifically for your cameras. It would put an end to endless questions and confusion about strange results, and it would allow users of your cameras to enjoy 60fps captures without concern about how to process the color.

Thanks for considering this!!

Peter

Stefan Geissler
April 25, 2012, 15:54:10
I was aware of the ICY800 program. It is very nice but not much use for planet captures since there is no way to select ROI. Capturing full frame video can fill a hard drive pretty quickly, and it puts additional stress on the computer, and particularly puts stress on the USB port which in my case is shared with software driving the mount. Again, I don't mean to sound negative, I'm just beingt realistic for my particular situation.

The ROI on the CCD cameras is done in software only, not in the camera. Thus the bandwidth allocation is the same regardless of the used ROI. But you are right, this little program is quite simple.


Yes, certainly I could just capture colored avi files using BY8/RGB24, but if I'm not mistaken is this not limited to 30fps captures? One of the appealing functions of the DBK21AU618 is the ability to capture 60fps, so on the brighter planets it is all about getting the most frames in the shortest time!

BY8 is the same as Y800, that means 1 byte per pixel. The only difference is the DirectShow graphbuilder, which automatically inserts the debayering filter, if BY8 is in use. Therefore, the frame rate is 60 fps as in using Y800.



I notice that you have not answered my question about the need for Debayering patterns different from what you indicated one should use, namely "BG." In a way I am glad that you are not answering this question because it rather validates my point that the issue of Debayering after capture is not nearly as straight forward as might be hoped for.

Sorry for that. Hewever, I rely on the IC Capture settings and what my programmers told me.


This is pure speculation on my part. I read somewhere (towards the end of the replies) in a post I put on this forum about a year ago about a "New Debayering method" that there is a directshow codec that is installed as part of the IS Capture program, and that this codec is what allows the color to be displayed within the program pre-capture. Is it possible that there is a mistake in this codec? What I mean is this. The CCD manufacturer indicates that the pattern is "GB," and all the programs I tested seem to work properly using "GB" (with the exception of FireCapture which uses "RG" for bilinear DeBayering, but "GB" for the others. The author of this program has stated that his program may not work properly with IS cameras). So, that appears to leaves only the capture program showing "BG" as the correct DeBayer pattern. Maybe it is a simple codec error that could be corrected. That in itself would eliminate a lot of confusion!


The DeBayerTransform.DLL is the file in question. It is a DirectShow Filter. It accepts Y800 and BY8 and produces RGB output.

flyer
April 26, 2012, 00:13:34
Stephan.

Thanks for your answers. I will experiment with the BY8/RGB24 at 60fps and see if I can make this work.

Re the DirectShow Filter....I think this is a question of semantics. I'm not saying the filter doesn't work. It obviously does. What I should have perhaps said is that the selection of the DeBayering pattern within the IS Capture program is possibly mislabled. Where it gives the choice for "BG" it should say "GB." I say this because this is what the chip manufacturer says, and because every program that I can test outside of IS Capture only gives correct color when "GB" is selected. It seems that maintaing the position that "BG" is the correct setting for DeBayering outside of IS Capture is confusing to say the least.

Thanks,

Peter

Stefan Geissler
April 26, 2012, 14:46:25
Peter,

I just downloaded and after a long search I found the debayering. I confirm, in Registax it is "GB", while in IC Capture it is "BG". That means the starting column could be different.

However, the start pattern will change in 3 of 4 cases, if an ROI is used. This is, because the ROI can start at any position on the image.

Addition:
After a discussion with the programmers it got out, that this is an old design issue in the IC Imaging Control SDK, where the constants have been named wrong. Therefore, we can not change this, because we will loose compatibility to all programs written by any
customer, who used this.

I am very sorry for this confusion.

However, Registax offers a fast preview, thus it is easy to see, which is the correct start pattern.

flyer
April 26, 2012, 23:07:53
Hi Stefan,

Many thanks for confirming my observation! I think your confirmation is very important because it clears up some of the mysterey of DeBayering and it isn't easy to obtain this information. At least with this out in the open informed choice can be made when trying to pick the correct pattern to use. While it some cases it may be easy to determin to infer the correct pattern, with a dim image of a small planet - unstretched - may make finding the correct pattern quite difficult.

Also, the comments re ROI are very interesting! Are you able to tell me if maintaining the same ratio (4/3) in the ROI may avoid one of the situations that would cause the DeBayering pattern to change?

By the way, I was able to get BY8/RGB24 to work fine at 60fps. This is an interesting solution, but in my tests, the image was not quite as satisfactory in terms of detail when compared to certain DeBayering methods (VirtualDub Filter, and bilinear, and smooth adaptive in Fire Capture). Naturally this is subjective to some degree and my test was not of a planet capture, but a fixed non-moving color pattern.

Thanks again for your asistance with this!

Peter

Stefan Geissler
May 2, 2012, 10:44:30
Also, the comments re ROI are very interesting! Are you able to tell me if maintaining the same ratio (4/3) in the ROI may avoid one of the situations that would cause the DeBayering pattern to change?
If you use Y800 as video format and an ROI, then the width and height must be at least an even number. However, the start pattern depends on the position where you set the ROI in any case.

Ringrocket
May 4, 2012, 16:50:51
By the way, I was able to get BY8/RGB24 to work fine at 60fps.

Hello Peter,
I also tested this combination. Although it seems to work I noticed that I actually get less than 60 fps when debayering is on (although a bit more than 30). Seems the transfer through my USB connectio is not fast enough ? Do you really get all the 60 frames in a minute ?

Jeffrey