Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align.Process not upscaling IR and Depth to Color. #11118

Closed
rajrajeswaran opened this issue Nov 17, 2022 · 4 comments
Closed

Align.Process not upscaling IR and Depth to Color. #11118

rajrajeswaran opened this issue Nov 17, 2022 · 4 comments

Comments

@rajrajeswaran
Copy link

Camera Model: Intel D415
Firmware: 05.12.07.100
Operating System: Windows 10
Platform: PC
SDK version: C# RealSense SDK 2.38
Language: C#
Segment: Windows Forms application.

I am currently using Intel RealSense C# SDK version 2.38 with Intel D415 sensor. Trying to understand why the following code does not upscale the IR and Depth frame to 1080 P. Any suggestion will be helpful.

using (frames)
                            {
                                foreach (var frame in frames)
                                {
                                    using (frame)
                                    {
                                        using (var p = frame.Profile)
                                        {
                                            Logger.Info(
                                                $"    {p.Stream} {p.Format,4} #{frame.Number} {frame.TimestampDomain} {frame.Timestamp:F2}");
                                            if (p.Stream == Stream.Color)
                                            {
                                                OnColorFrame(frame);
                                                LastFrameTime = DateTime.UtcNow;
                                            }
                            
                                            if (p.Stream == Stream.Infrared)
                                            {
                                                using (var aligned = new Align(Stream.Color).Process(frame))
                                                {
                                                    OnInfraRedFrame(aligned);
                                                }
                                            }
                            
                                            if (p.Stream == Stream.Depth)
                                            {
                                                using (var aligned = new Align(Stream.Color).Process(frame))
                                                {
                                                    OnDepthFrame(aligned);
                                                }
                                            }
                                        }
                                    }
                                }
                            }

@rajrajeswaran rajrajeswaran changed the title Align.Process to upscaling IR and Depth to Color. Align.Process not upscaling IR and Depth to Color. Nov 17, 2022
@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Nov 18, 2022

Hi @rajrajeswaran Infrared cannot be aligned to Color in this way with an Align(...).Process instruction, as one of the two stream types in this kind of alignment has to be Depth (such as Depth to Color, or Color to Depth).

#1556 (comment) provides advice regarding an alternative method for how infrared and color might be aligned. There is not an example available of C# code for doing so though.

#5093 is a case that explores aligning all three streams as the above link suggests. Again, there is not a C# example for doing so, unfortunately.

@rajrajeswaran
Copy link
Author

Hi @rajrajeswaran Infrared cannot be aligned to Color in this way with an Align(...).Process instruction, as one of the two stream types in this kind of alignment has to be Depth (such as Depth to Color, or Color to Depth).

#1556 (comment) provides advice regarding an alternative method for how infrared and color might be aligned. There is not an example available of C# code for doing so though.

#5093 is a case that explores aligning all three streams as the above link suggests. Again, there is not a C# example for doing so, unfortunately.

@MartyG-RealSense as always, Thank you for the quick response. I will review those posts. You may close this request. Thanks again.

@rajrajeswaran
Copy link
Author

@MartyG-RealSense as always, Thank you for the quick response. I will review those posts. You may close this request. Thanks again.

@MartyG-RealSense
Copy link
Collaborator

You are very welcome, @rajrajeswaran -thanks very much for the update!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants