-
Notifications
You must be signed in to change notification settings - Fork 173
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
OutOfMemoryError #36
Comments
Use |
Hi @saudet Video infor: Dimension: 540x960 |
Ok, so it looks like you're trying to store too many images in memory.
Don't do that?
|
Hi @saudet |
Ok, might be an issue with the project, which one would that be?
|
@saudet |
I don't think so, but it shouldn't be too hard to adapt this C++ sample: |
@saudet I have written some codes, but in the SDK have not GoodFeaturesToTrackDetector(I using openCV 4.0) class.
I will try to convert it to java. |
Hi @saudet
In my codes:
frame_source.cpp, line 71
I have refer #277, but no resolved for me. |
Right, it's not being linked with FFmpeg, but we probably want more freedom than that anyway, so try to implement an IFrameSource frameSource = new IFrameSource() {
@Override public void reset() { ... }
@Override public Mat nextFrame() { ... };
} |
@saudet and StabilizerBase |
I just gave you the code, what error are you getting with that code? |
@saudet In my code, how to use the snippet code below.
implement
My codes
I have written this code in C++ using NDK (JNI) but when I ran, the same error occurred? Why? |
Replace it with copy/paste...? or what do you mean?
The file error is probably because you didn't give access permission to the
application.
|
No, I do not understand how to implement it.
I have set permission read file. |
Looks like you need to read up on Java a bit, read this page from the tutorial: |
@saudet
|
That's for you to decide, where are your images?
|
I don't understand what you mean. |
Where is your video?
|
/storage/emulated/0/DCIM/Camera/patio.mp4 |
Ok, we could do something like this: IFrameSource frameSource = new IFrameSource() {
FrameGrabber grabber = new FFmpegFrameGrabber("/storage/emulated/0/DCIM/Camera/patio.mp4");
OpenCVFrameConverter.ToMat converter = new OpenCVFrameConverter.ToMat();
@Override public void reset() { grabber.restart(); }
@Override public Mat nextFrame() { return converter.convert(grabber.grabImage()); }
}; |
@saudet In code C++ I have using
In the code (**) corresponding to in the Java. |
@saudet But in Java code can't use it.
I don't want to convert Mat to IplImage (improved performance). |
@monxarat Call |
@saudet In code C++ I have using C++ code:
Java Code
In the code (**) corresponding to in the Java, This snippet code I do not understand (I think to wrap FrameSource and Frame after stabilized? Right) |
Yes, try to use an object created like I showed you above: #36 (comment) |
@saudet After stabilized, |
What error do you get?
|
Logs
|
Ah, it looks like we'll need to call start() on grabber just after creating
it.
|
I have created class MyFrameSource
Before called |
Great! Please consider sending a pull request to add your sample.
|
@saudet The while loop in the The processing time doubled. How to call |
We can call restart() after start(), that's not an issue.
|
@saudet when calling |
You're talking about imwrite() I think?
|
yes, but I want to save Frame in the |
Yeah, why not?
|
You'll need to create a fork first: |
How to do this. |
With imwrite() I guess. What error message do you get when trying?
2018年7月23日(月) 15:37 monxarat <[email protected]>:
… yes, but I want to save Frame in the asIFrameSource in the
TwoPassStabilizer. Can I do that?
Yeah, why not?
How to do this.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#36 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ADLIF0APPNndOrltU-nCe9TPQn5SPgIlks5uJW89gaJpZM4VAvjw>
.
|
No, In my code I have using When call
When
|
Do you mean, how to use FFmpegFrameRecorder?
|
No, The current, I save Frame to Image follow code. But I do not want using this code. because of it very slow. the current codes.
... implement processing method
|
Well, writing image files is slow... |
Is there a way to make it? |
They are many ways. Saving your images uncompressed or using an accelerator are probably the easiest thing to try. |
java.lang.OutOfMemoryError: Physical memory usage is too high: physicalBytes = 384M > maxPhysicalBytes = 384M
The text was updated successfully, but these errors were encountered: