Comments (6)
Hi, @tonitch, thanks a lot for the well written report, I really appreciate it :)
Getting straight to the point: we currently only support a few opencv and eigen image/matrix classes out of the box. To support other image types, you have to follow https://github.com/OpenImageDebugger/OpenImageDebugger#advanced-configuration . Basically you have to implement a python interface that tells OID how to draw an image. @csantosbh wrote a blog post with more details about it, but I don't remember the link by heart. I will try to find it later.
I would suggest that you try compiling and debugging the testbench project in this repo. There we emulate cv::mat classes. Put a breakpoint on line 351 and you should be able to see the buffer.
Alternatively, you can try to replicate your tests with either opencv or eigen instead of stb.
Regarding arch: I currently have no plans of supporting distros other than Ubuntu since this is mostly a hobby project and I am barely able to properly maintain it as it is... But feel free to go and add it to aur.
if there is anything particular to know when packaging this project I would really apreciate to know ^^
The tricky part is qt. You gotta read their license very carefully to understand how this affect packaging of OID. Currently the installation relies on having qt installed as shared library (vi apt on ubuntu) and I am not entirely sure if we could just vendor the .so's in a package, for instance.
A suggestion is that you create as an entry point scripts (maybe called gdb-oid
and lldb-oid
) that wrap a call to gdb/lldb and import/source oid.py from it.
from openimagedebugger.
Found the blogpost: https://csantosbh.wordpress.com/2016/10/15/configuring-gdb-imagewatch-to-visualize-custom-buffer-types/#more-492
from openimagedebugger.
Thanks a lot for you fast response. I'v got a long week end ahead so I will try that next week. The project is really cool and is pretty much exactly what I was looking for (minus the fact that I'm not smart enought to make it work properly haha)
for the packaging, qt is in arch's package already and I have put it as a dependency so this should work properly and I don't think license is a problem as many other repo have it this way :)) (I just finished it : https://aur.archlinux.org/packages/openimagedebugger ) I will certainly do the entry point next week as well ^^
from openimagedebugger.
here is my solution for those who need
OpenImageDebugger/oidscripts/oidtypes/stb.py
from oidscripts.oidtypes import interface
from oidscripts.symbols import *
class STBInspector(interface.TypeInspectorInterface):
def get_buffer_metadata(self,
obj_name, # type: str
picked_obj, # type: DebuggerSymbolReference
debugger_bridge # type: BridgeInterface
):
width = 9
height = 9
comp = 4
return {"display_name": obj_name,
"pointer": picked_obj,
"width": width,
"height": height,
"channels": 4,
"type": OID_TYPES_UINT8,
"row_stride": width,
"pixel_layout": "rgba",
"transpose_buffer": True}
def is_symbol_observable(self, symbol_obj, symbol_name):
# type: (DebuggerSymbolReference, str) -> bool
return (str(symbol_obj.type) == "unsigned char *")
I has to be configured for each images but at least it's a start ^^
This project is really awesome and I think a way to improve it would be to configure it on the go. Like there would be a dropdown for each images format existing ( I could make one for raylib) and there would be a custom one where it would be possible to configure each parameter of the above list until you see your image. (I can make a separate and more specific issue if desired)
My "issue" is resolved so I will close it. Thanks for your help!
from openimagedebugger.
Thanks a lot for providing this example!
Like there would be a dropdown for each images format existing
For supported classes/structs (i.e. scripts under OpenImageDebugger/oidscripts/oidtypes/
), this is done seamlessly.
and there would be a custom one where it would be possible to configure each parameter of the above list until you see your image. (I can make a separate and more specific issue if desired)
I think it would be nice to have this idea in a new issue indeed. It is slightly related to
#30 (a bit old, I know...), but there I was thinking about a command line interface to display "structless" images instead of proper GUI to it.
from openimagedebugger.
For supported classes/structs (i.e. scripts under
OpenImageDebugger/oidscripts/oidtypes/
), this is done seamlessly.
When there is no ambiguity in the type, this is clearly not a problem ^^ I was thinking about multiple specific libs that has similar pattern and couldn't be dissociated ^^
I think it would be nice to have this idea in a new issue indeed. It is slightly related to #30 (a bit old, I know...), but there I was thinking about a command line interface to display "structless" images instead of proper GUI to it.
I will play with oid for a while and then will come back to do that for sure !
from openimagedebugger.
Related Issues (20)
- Remove qmake support in September 2021
- Eclipse IDE and embedded image processing projects debuging (MCU) HOT 1
- create a new Qt Widgets Application instead of the current plug-in HOT 2
- cannot debug and continuing report waitforbyteswirtten HOT 1
- Add observable symbols in (this) class.
- how to build on HOT 1
- Add support to VSCode WSL remote HOT 10
- Cannot view Eigen::MatrixXf when using CodeLLDB HOT 7
- Late initialization of image structs HOT 3
- An error occurred while compiling HOT 6
- Windows version crushes with error message: The procedure entry point ?edit@QAbs......... HOT 1
- AttributeError: 'NoneType' object has no attribute 'GetSelectedTarget' HOT 4
- Eigen matrices are not working, python crashes in gdb (solution is a one liner) HOT 4
- Error while building with Qt < 5.11 HOT 6
- Invalid plotting of OpenCV matrices HOT 4
- OpenCV matrix inside `std::vector` is not displayed in LLDB HOT 3
- Mac M1 compile and execute problem HOT 1
- INFO: Could not activate hooks for any IDEs Stop hook #1 added. HOT 1
- Missing proper documentation for gdbbridge -> get_casted_pointer
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openimagedebugger.