Ran into this problem a few years ago and posted a question. Was able to puzzle something together calling a python script but this is suboptimal as I need to now scale this up to a much larger volume of image conversion.
Does anyone know of a way to do this in pure DotNet core, without using the old windows image API's ?
Thank
Related
I have some C# code that relies on doing really basic graphic operations such as getting and setting pixels, and drawing texts over images. This uses the System.Drawing package which Microsoft has dropped the ball on.
Microsoft says this: Migrate to one of the following libraries: ImageSharp, SkiaSharp, Microsoft.Maui.Graphics. The latter appears to be ill-documented and unstable.
Could anyone with experience with these packages suggest an easy and simple way forward?
I am even wondering if it might pay to write my own library for the Windows bitmap format (which is sufficient for my purposes).
Yours frustratingly...
It depends on which platform you are building your app, but SkiaSharp 2.80.2 or 2.80.3 can be a good choice. There are quite a bit problems in newer packages, so you need to be careful which version you install so that you do not run into performance problems or bugs.
I'm currently working on a Qt-GUI with which I plan to remote control a robot. The robot is ros-controlled and equipped with multiple cameras. The topic is completely new to me and I just started learning both Qt and ROS and have some basic questions. I didn't make any progress googling around so I finally decided to post it here:
How can I connect data from ROS with Qt? So let's say I kind of want to live-stream the recordings of the cameras into my GUI. How is the general procedure there?
I've seen this ROS Qt Creator Plug-in. Is that something I want to use for this project?
Thanks a lot to everyone answering.
This is my first post here so I hope I didn't mess anything up or flouted forum regulations.
Edit 1: I am working with C++.
Edit 2: In case it helps you giving me advice; the rostopic type of the camera topic is sensor_msgs/Image.
For question 1, since the images are coming over the sensor_msgs/Image topic, using ROS with OpenCV's cv_bridge in the Qt application to receive the the incoming image stream from ROS into the Qt-GUI is a good start. There are several tutorials that cover integrating OpenCV into a Qt project. An important advice is to keep track of the image properties (size, color format, etc.), which will help in displaying the image properly in the GUI. Disclaimer: I have worked with Qt libraries on the Python side, not with C++.
As for question 2, the information for setting up, building, and running the code within the Qt-Creator can be very convenient. There are times where it is prudent to use an IDE to build, run, and debug code (to deal with memory management, segmentation faults, etc.), while other for other times running "catkin_make" or "catkin build" in the root directory when the hardware is minimal.
I need to play audio from my Qt project deployed on Raspberry Pi. Everything works fine except that I don't get any audio out, instead I get the following error message
defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.mediaplayer"
After googling around I have come to the conclusion that the problem is that Gstreamer is not installed and recognized by Qt (more precisely gst-omx). Also, I have tried for many days to proper install gst-omx on Raspberry Pi without much luck.
Can anyone guide me to how I solve this issue???
One hack would of course just to use an external application to play the audio like mpeg321 and just start it up by QProcess, but I need to control volume and be able to start, stop, and pause, so such a solution is not really feasible...
Short answer: Well man, you found what many people find. Qt won't work with the Raspberry Pi just like that. You might get it to work, but without accelerated decoding it will just run as slow as it can get, and crash every few seconds. Sorry.
Long Answer #1: Qt needs to be compiled with special routines in order to get access to the omx stuff. This is, accessing the dedicated hardware embedded into the board which handles accelerated decoding of the h.264 (an a few others) files.
You have two choices, one is to build a special module from here: Carlon Luca's Github or you get a baked in Raspbian image with everything compiled in place from here: The Bugfree Blog. If you are a newbie on this, building it might give you a very hard time but you will get rather stable code and your choice of Qt and an up to date raspbian. The precompiled image on the other hand is just a matter of download, burn and run, very easy!, but it has some older code, so it has some rough edges and it's a bit unstable (almost every video i've tried shows garbled for the first 2-3 seconds and had crashes from time to time), also you will get Qt 5.1.2 without some of the speedups Qt guys added at 5.2.x.
Long answer #2: There are indeed gst-omx libraries which supposedly work with Qt and supposedly are way more stable, I've never tested them. But you can check for yourself Google: Qt Bellagio, I tried to post the links for them, but had not enough rep. You will have to build your own Qt btw.
Update:
If what you need is video playback, i forgot to mention Boot2Qt for the Pi, but you have to pay Digia for the license. It's called Qt Enterprise Embedded, google it.
Recently I've had to work with big, existing projects to get them to compile. So far, it's been a pain in the butt to download all of the necessary libraries and configure the environment correctly.
If I had a checklist that I could hand to project leads, listing: "here's what I need to run your project," that'd save me time and effort.
Does anyone have any checklists, advice or readings on how to simplify compilation of big projects?
thanks
Use build scripts. Compiling a large project shouldn't be any more difficult than compiling a small project. A single command should be all that is required.
without knowing what language you're targeting, I can't be more specific.
almost all nix source distributions come with a README file which should list the dependencies.
I am working on an ASP.NET 3.5 project which has 55 projects in a solution. When opening the solution in Visual Studio 2008, it takes over a minute to open - about 1 second for each project. However, if I disconnect the network cable before opening the solution, it only takes about 15 seconds! Any ideas about what could be causing the slowdown?
I had this happen to me back in the days when we were using Visual Source Safe.
Could be your source control plugin asking for updates if you have the solution under source control.
You should do some investigation, fire up Wireshark, start a capture on the interface in question and see what traffic is flowing over the wire.
Can I answer a question with a question? What is the secret to getting VS to not just die with that many projects, let alone load in a phenomenally quick 60 seconds?
At about 10-12 projects the compile time on Visual Studio becomes unbearable, at about 5-8 projects Resharper will crash. The IDE is such a memory pig that even opening more projects by using multiple instances of VS usually isn't an option.
Anyhow, it's all about memory usage and the odd ball out project is probably doing it, e.g. the one with the most files.
I had the same problem this week (5 years later!!). It was caused by a huge .suo file (almost 400 Mb), deleting it fixed the problem.
A few years ago I remember a colleague having some similar problem (with a lot smaller solution, and in VS2003). Can't remember the details, but I think it was related to the local ASPNET user account (or rather, that it did not exist). Not sure though...
As a side note: I usually find it more efficient to have perhaps around a handful of projects in each solution (usually one solution produces one or two assemblies used in production code), and then have a few Visual Studio instances running at the same time. 50+ projects in the same solutions feels like asking for problems.
Might be that you have other dependencies though, just wanted to share my thoughts.
which has 55 projects in a solution
WOW. I can't imagine what type of solution needs that many projects. The answer is probably that your source control provider needs to refresh the status of each of the items, all of which take time.
For edit-merge-commit style version control systems, such as subversion, this operation doesn't take place. Try temporarily removing source control from the entire solution to see if this is the culprit.
If your solution is attached to source control, then it is trying to load up the symbols and verify which items you have checked out. So, if you have a slow connection, it is oftentimes faster to take the solution offline.
http://www.tmgirvin.com/2009/03/working-offline-with-visual-studio-2008-and-tfs.html
EDIT
Another solution which I've seen used,
create a
_webTier.sln
_database.sln
_build.sln
( is your project name)
and each of those solutions is a self-sufficient part of the entire project, but that way if you are working on the webtier and you don't need the database project or the mobile project parts to load up, you can just open the webtier solution.
The build solution contains the entire package that needs to be built, and takes a very long time to load.
I had this problem on a development machine with no internet connection and it turned out that the problem was related to a setting in IE's internet options:
Control Panel -> Internet Options ->
Advanced -> Security -> Check for
publisher's certificate revocation
After making sure this was unchecked my solutions started loading quickly again.