Code Monkey home page Code Monkey logo

Comments (6)

nettyxiong avatar nettyxiong commented on May 17, 2024

frame9248

from simpleimage.

nettyxiong avatar nettyxiong commented on May 17, 2024

这个就是报异常的图片,希望能给出测试解决方案

from simpleimage.

axmanwang avatar axmanwang commented on May 17, 2024

非常抱歉,目前没有任何能处理所有图片格式,包括adobe photoshopbn 也存在打不开的图片,但换一种工具就能浏览,我们能做的只是改最大
努力去解析图片。但是万一解析不了,可以在捕获异常中换一种方式转换图片再试试。

在 2015年4月18日,下午4:42,sixiong [email protected] 写道:

这个就是报异常的图片,希望能给出测试解决方案


Reply to this email directly or view it on GitHub #6 (comment).

from simpleimage.

nettyxiong avatar nettyxiong commented on May 17, 2024

您提到的换一种方式转换图片指的是?
image
这个代码换一种方式进行转化吗

from simpleimage.

axmanwang avatar axmanwang commented on May 17, 2024

你好,这个问题已经查明是一个float精度丢失造成的bug。

if (idxDir < 0.0) {
idxDir += directionCount;
}

directionCount = 8(int)
idxDir 是float.
结果是 idxDir 很小的负数是,idxDir < 0.0成立,但是 idxDir += 8;还是8.0,现在修改成double,问题已经解决。
原来的实现是都是用double,精度很高,准确性也很高,但是计算时太占用内存,我折中一下,将大多数的double优化成float,可以节省一半的内存空间。
但是优化后这里精度就丢失了,出现了bug。

建议如果不在意内存,将实现中所有float替换成double,这样精度高,识别准确率也很高。

在 2015年4月20日,上午9:17,axman [email protected] 写道:

将BuffreadImg img转换成为其它格式,比如从jpg另存为png再重新读出来试试。

在 2015年4月19日,下午8:50,sixiong <[email protected] mailto:[email protected]> 写道:

您提到的换一种方式转换图片指的是?
https://cloud.githubusercontent.com/assets/8112710/7219488/b8563690-e6d5-11e4-807c-35c68da2d982.png
这个代码换一种方式进行转化吗


Reply to this email directly or view it on GitHub #6 (comment).

from simpleimage.

nettyxiong avatar nettyxiong commented on May 17, 2024

好的,谢谢

from simpleimage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.