Advanced Question Is Image Processing is possible in Orbiter API?

Evgheny

New member
Joined
Oct 18, 2011
Messages
29
Reaction score
0
Points
0
Location
Moscow
Hello, Orbiter Forum.

I need to write a plugin, that requires Image Processing algorithms. But how to capture images from Orbiter? Is there any API function ( LUA or C++ ) that can get images of front view of vessel (from the main window - what the vessel "is seeing")?

I need this for writing such a plugin as following the target (another vehicle, Sun, etc)

I've seen - there is a plugin "Screen capture" - but as I understood - it makes screenshots (as user of Orbiter sees the screen, but not the exact view of camera - front view for example) and it saves screenshots in files. So it will be slow to get images from external files (for about 10-20 times in a second)

Sorry for my bad English, hope you'll understand my questions.

Thank you in advance, Evgheny.
 
Last edited:
Hello, Orbiter Forum.

I need to write a plugin, that requires Image Processing algorithms. But how to capture images from Orbiter? Is there any API function ( LUA or C++ ) that can get images of front view of vessel (from the main window - what the vessel "is seeing")?

I need this for writing such a plugin as following the target (another vehicle, Sun, etc)

I've seen - there is a plugin "Screen capture" - but as I understood - it makes screenshots (as user of Orbiter sees the screen, but not the exact view of camera - front view for example) and it saves screenshots in files. So it will be slow to get images from external files (for about 10-20 times in a second)

Sorry for my bad English, hope you'll understand my questions.

Thank you in advance, Evgheny.


Not that I know of, but that doesn't mean there isn't one.
 
Orbiter 2012: Photoshop edition.

---------- Post added at 08:46 ---------- Previous post was at 08:44 ----------

Why do you need to capture images to track a target, though?
 
There are no APIs such as this in the orbiter API.

You'll need to get a handle on the DC of the main window and then do some blit operations to get the image. I don't know how you'd get different views than the main ones, but it's obviously possible, so I'd contact the author of CameraMFD and ask for advice/source-code and then go from there
 
Hello, Orbiter Forum.

I need to write a plugin, that requires Image Processing algorithms. But how to capture images from Orbiter? Is there any API function ( LUA or C++ ) that can get images of front view of vessel (from the main window - what the vessel "is seeing")?

I need this for writing such a plugin as following the target (another vehicle, Sun, etc)

I've seen - there is a plugin "Screen capture" - but as I understood - it makes screenshots (as user of Orbiter sees the screen, but not the exact view of camera - front view for example) and it saves screenshots in files. So it will be slow to get images from external files (for about 10-20 times in a second)

Sorry for my bad English, hope you'll understand my questions.

Thank you in advance, Evgheny.


First of all, welcome to Orbiter Forum Evgheny :welcome:

As for your question, if you need to track/ follow another vessel object in Orbiter, then I think that real time image processing wouldn't be the greatest idea. Better option in this case would be to get the object position from VESSELSTATUSx (where x = 2, 3 ...) structure by calling GetStatusEx OAPI function and then base all other calculation on this information. For planets and sun there are CELBODYx classes which should contain some information about theirs position as well but I'm not sure about that.

That's just my :2cents: but if I were you I wouldn't go for any type of image processing for object tracking/following unless your plug-in realy needs to do it this way. I would try to use parameters in respective classes instead.
 
The math you can do by tapping into oapi functions such as GetRelativePos and GetGlobalPos will be much more accurate and cheap than anything you can do through image analysis...

Roger that. But it IS tempting to do things the hard way, isn't it?
 
2 Spacethingy, 2 agentgonzo
THIS addon turns an MFD into a sort of secondary view window, whose angle and position can be anywhere.
Dunno if that helps!

You'll need to get a handle on the DC of the main window and then do some blit operations to get the image. I don't know how you'd get different views than the main ones, but it's obviously possible, so I'd contact the author of CameraMFD and ask for advice/source-code and then go from there

Thank you for advicing this plugin, I think it can help me (and author will share sources)

2 RisingFury,
Why do you need to capture images to track a target, though?

Because it's my study work in the university. The main task is image processing in space ( tracing systems on aircrafts' board, etc). Orbiter was choosen because it's powerful, has API and SDK, and it's free. So Orbiter is just for testing of image processing algorithms. The decision in future will be used not only in Orbiter - but in may be other software.
That's why I need only image processing but not detecting by coordinates, etc.


Thank you for your help.
I think I'll try to make it with ScreenCapture and CameraMFD plugins ( I'll ask for the sources and I hope it really will help me ).
 
THIS addon turns an MFD into a sort of secondary view window, whose angle and position can be anywhere.
Dunno if that helps!

I tried contacting him but he appears to no longer be active. I had a similar Question because I wanted to incorporate a CCTV-esque docking port camera into one of my own addons.

It would also be quite handy for something like the artlav's telescope addon.
 
Back
Top