• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps Android Video Frame Retrieving

baris3437

Newbie
Oct 26, 2010
12
0
Hi everyone!

I'm new in developing andorid apps. this semester, I'll do an app called video summarization on android platform. Unfortunately, I don't have enough knowledge to do it.

On android platform, is this possible? İf this is possible, how can I do this?
With my researches, I found informations below:

On android platform, video format is .mp4 . First, we have to retrieve frames from our .mp4 file. .Mp4 files are so complicated. This can be easy with using Opencv functions. but Opencv is written in C++. So I can't use OpenCv functions in my Java codes. But this can be possible with JNA and JAVACV.
Firstly, I set up Opencv in my computer. then I downloaded jna.jar and javacv.jar . and I imported these jars to Eclipse. I did some samples with using javacv methods. But I can't handle this. some errors occured. Here is my code:

package den;

import static name.audet.samuel.javacv.jna.cxcore.v21.*;
import static name.audet.samuel.javacv.jna.cv.v21.*;
import static name.audet.samuel.javacv.jna.highgui.v21.*;

public class Dene {
public static void main(String[] args) {
IplImage image = cvLoadImage("C:\\Users\\baris\\Desktop\\1.jpg", 1);
if (image == null) {
System.err.println("Could not load image file.");
} else {
cvSmooth(image, image, CV_GAUSSIAN, 3, 0, 0, 0);
cvSaveImage("C:\\Users\\baris\\Desktop\\2.jpg",image); // error occured in this code.
}
}
}

Here is the error:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x187113e0, pid=1100, tid=816
#
# JRE version: 6.0_20-b02
# Java VM: Java HotSpot(TM) Client VM (16.3-b01 mixed mode windows-x86 )
# Problematic frame:
# C [libhighgui200.dll+0xd13e0]
#
# An error report file with more information is saved as:
# C:\workspace_eclipse\denemee\hs_err_pid1100.log
#
# If you would like to submit a bug report, please visit:
# HotSpot Virtual Machine Error Reporting Page
# The crash happened outside the Java Virtual Machine in native code.
# See problematic frame for where to report the bug.
#


Anyway, if the way I followed is true, I'll follow this way and fix the errors. In contrast if not, please give me the right way to handle this project.
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones