I have been using ARToolKit to calibrate my camera, everything went fine until I tried to save the result, it came up with this error:
Error (13): unable to open camera parameters file "camera_para.dat" for writing.
Result too large
Parameter write error!!
I used the ARToolKit's calib_camera example code.
Thank you in advance!
I've actually figured this out...it was just because my ARToolKit was installed in Program Files folder, which is read-only. To save the results successfully, all you need to do is to run as administrator at the beginning.
Related
I try to access frames of RTCVideoRenderer without success, can you help me please ?
I noticed that there is a "didCaptureVideoFrame" method in RTCVideoCapturerDelegate, but not in RTCVideoViewDelegate.
I have never done objc, I added a method in RTCVideoViewDelegate to get frames (bellow "didChangeVideoSize"), but it do not get fired, I guess it do not work like that.
I am able to access frames from the remote using Android using the "onFrame" of VideoSink, I thought it would be that easy using ios.
PS: To add the method, I took the framework from the pod and put it in the project, because I noticed that when you modify a pod, changes do not apply.
Here is the line I added :
- (void)videoView:(id<RTCVideoRenderer>)videoView didRenderVideoFrame:(RTCVideoFrame *)frame;
I will now try to compile the library with the changes I want.
EDIT:
I am now compiling the library, I noticed the need to change several files to be able to access frames, it will not be done just by adding 10 lines.
Solved thanks to this : How to get frame data in AppRTC iOS app for video modifications?
I used this line instead (because names changed since) :
#property(atomic, strong) RTCVideoFrame* videoFrame;
I wanted a "onFrame" like VideoSink on Android, but it will be ok for now.
newbie here. I am following along this SFML flappy bird tutorial. I am currently stuck at this portion of stage creation where a "Splash State" (or logo loading screen) is made. The code of which is exactly the same as what is shown here.
I am using xcode 10.1.
The project builds. But when I tried running it, it crashes and I am greeted with the following:
Failed to load image "Resouces/res/Splash Background.png". Reason: Unable to open file
libc++abi.dylib: terminating with uncaught exception of type std::out_of_range: map::at: key not found
(lldb)"
If I understand it correctly, it's saying it cannot perform the action of loading the image at the aforementioned path because it is not able to open "libc++abi.dylib". And now the program is being terminated. (please help me understand this problem better by either confirming or correcting me here).
When I tried looking for "libc++abi.dylib", it is missing. Instead, I can only find "libc++abi.td".
This thread says to add that under Link Binary With Libraries. That did not produce any result.
The tutorial shows that the code runs and a "Splash State" or logo screen is expected to appear. Instead my program crashes and I am greeted with the aforementioned error.
I was wondering if anyone else ran into similar issues?
It's solved. It is made by a typo on my end... sorry.
I'll try my best to explain it here for those of you who may have the same issues:
The game asset is governed by a map, which is a private member variable of a "AssetManager" class. The typo is at the file path. Because of this, the map never inserted the key since the file path isn't valid.
When the map is later accessed, it would be out of range since nothing ever got inserted (since the asset did not load).
Basically, the error of not being to open "libc++abi.dylib" is caused by the map being out of range.
I'm trying to take a screenshot of the screen in my C++ code. The code is executed in the terminal.
I only have few milliseconds to capture the screen so I would like to use a code that is possibly really fast.
So far I have tried:
System("import -window root screenshot.jpg");
but It fails stating that it doesn't recognize import.
I have also tried:
System("sudo scrot");
which fails as well with this error: "Can't open X display. It is running, yeah?"
Any ideas on how to take a screenshot of screen really fast?
I use namedWindow with openCV and get an error:
(Image1): Gtk-WARNING **: cannot open display:"
The code is:
Mat image1 = imread("image1.jpg");
cv::namedWindow("image1");
cv::imshow("image1",image1);
waitKey(0);
Someone says he solves it by: "export DISPLAY=:0".
But I don't really understand what does this solution mean.Since I am a beginner in opencv and c++. Could someone explain it in detail. e.g. How to add the code? Where to implement?
You seem to be lacking the context of your X server.
The easiest way to make this work is to login graphically, then open a terminal, then start your application. This means, not opening a session for another user, e.g. root.
If you want to run the program as another user or from remote, you need other solutions. Please specify what you are doing. It is a common problem (it is about authorization) with common solutions depending on your use-case! It is not a OpenCV-related problem.
Im using Magick++ Library with Qt
Im using the following code to read and write an image:
Image image;
image.read(qPrintable(f.absoluteFilePath()));
image.addNoise(GaussianNoise);
image.magick("png");
image.write("image_name");
Where f.absoluteFilePath is the absolute path for my image
Example: /Users/user/Desktop/test/P1030673.jpg
After the completion of the code, I cannot locate the image named 'image_name'.
I looked into the folder of the first image '/Users/macmini/Desktop/test/' and its not there
I tried to search the image, but it seems is not in my computer.
Where do I go wrong?
How can I save the image in my computer?
is there any way to specify the path that I want the image to be saved?
Thank you
You should find the file saved in the current working directory. If you want to save it elsewhere give an absolute path.
For everyone who might have tha same problem:
Imagemagick will save the images inside the .app bundle
You will not be able to find the image files unless you specify a path inside the read() function
I noticed the following by checking the size of my .app file
It was increased everytime I was trying to save images.