Skip to content

ZenCoderWu/RapidOrientation4j

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RapidOrientation4j

基于RapidOrientation实现的Java移植版本(ONNXRuntime + OpenCV)

快速开始

安装依赖,默认使用CPU版本。 Gradle 引入:

implementation 'cn.mnjblog:RapidOrientation4j:1.0.0'

Maven引入:

<dependency>
    <groupId>cn.mnjblog</groupId>
    <artifactId>RapidOrientation4j</artifactId>
    <version>1.0.0</version>
</dependency>

DEMO

/**
     * 角度识别测试
     *
     * @throws Exception
     */
    @Test
    public void OrientationTest() throws Exception {
        RapidOrientation rapidOrientation = new RapidOrientation();
        File file0 = new File("src/test/resources/test_files/img_rot0_demo.jpg");
        OrientationResult orientationResult = rapidOrientation.call(file0.getAbsolutePath());
        Assertions.assertEquals(0, orientationResult.getOrientation());

        File file180 = new File("src/test/resources/test_files/img_rot180_demo.jpg");
        orientationResult = rapidOrientation.call(file180.getAbsolutePath());
        Assertions.assertEquals(180, orientationResult.getOrientation());
    }

About

基于RapidOrientation实现的Java移植版本(ONNXRuntime + OpenCV)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages