存档

文章标签 ‘android’

Android和iOS自带的人脸检测API

2011年9月26日 没有评论

说说Android和iOS里面自带的人脸检测API。

Android提供了一个人脸检测类 android.media.FaceDetector,调用findFaces函数,它可以返回图片中的找到的人脸。人脸的属性封装在Face类,包括x, y, z三轴的人脸pose,还有两眼距离eyesDistance()。这个API从Android刚推出时Level 1就已经有了。

iOS以前是没有人脸检测模块的。去年苹果收购了Polar Rose,把他们人脸检测技术融入到新推出的iOS 5当中:CIDetector是个通用的检测器,构造时可以指定感兴趣的目标,目前只能检测人脸CIDetectorTypeFace。返回的人脸信息封装在CIFaceFeature类中,包含了:leftEyePosition, rightEyePosition, mouthPosition  5现在还在Beta测试版中,只对付费developer开放,估计很快就要正式发布了。

从功能上来看两者差不多。至于效果,我只看过WWDC上iOS的Demo,可以做实时Avatar。Android的API从初代Level 1就有了,如果用的人不多的话,猜测可能效果不能保证。

VIA 老杨

分类: 新闻 标签: , ,

Android-opencv之CVCamera

2011年1月21日 2 条评论

hellogv再次发力,献出opencv2.2android教程

全文照抄如下。 阅读全文…

分类: 新闻, 资源 标签: , , , ,

Asift Android 移植

2010年12月27日 没有评论


hellogv再次给力,继搞定windows mobile之后,神速将ASift移植到了Android

分类: 新闻 标签: , ,

转:Android模拟信号示波器

2010年11月24日 没有评论

转自牛逼的胸中无码的hellogv。同时献给xiaochao,赶紧学习一下。

上次简单地介绍了AudioRecord和AudioTrack的使用,这次就结合SurfaceView实现一个Android版的手机模拟信号示波器(PS:以前也讲过J2ME版的手机示波器)。最近物联网炒得很火,作为手机软件开发者,如何在不修改手机硬件电路的前提下实现与第三方传感器结合呢?麦克风就是一个很好的ADC接口,通过麦克风与第三方传感器结合,再在软件里对模拟信号做相应的处理,就可以提供更丰富的传感化应用。

先来看看本文程序运行的效果图(屏幕录像速度较慢,真机实际运行起来会更加流畅):

来源

分类: 新闻 标签: , ,

召唤大伙参赛,至少有androidT恤可以拿

2010年7月6日 5 条评论

刚看到这个博客比赛

暑期大学生博客分享大赛 – 2010 Android 篇

请围绕Android手机应用分享你自己的精彩故事或者创意点子,请围绕以下主题,动手写博文分享吧!

  • 主题 1:分享开发 手机应用的开发经验。比如晒一下你是如何在 Android 平台上一步一步开发应用程序的;比如分享一下你开发过程中,有哪些捷径或者又走过哪些弯路等等。
  • 主题 2:分享 Android 手机应用创意或点子。如果你不具备开发能力也不要紧,只需要创意的点子也可以。比如秀一下您心目中在 Android 手机上应该有哪些实用的或者好玩的小应用;比如说一说你觉得大学生都喜欢什么样的 Android 手机应用等等。
  • 主题 3:体验 Android 手机的精彩小故事或者憧憬一下你心目中的 Android 手机。讲一下你在生活中使用 Android 手机一些不同寻常的小故事;没用过 Android 手机也没关系,可以畅想一下您心目中的 Android 手机应该是个什么样子。:)

奖项设置

  • 一等奖(3个):
    • Android应用最佳开发经验分享奖(1个):Android高端智能手机1部
    • Android应用最佳创意点子分享奖(1个):Android高端智能手机1部
    • Android最佳体验或憧憬分享奖(1个):Android高端智能手机1部
  • 优胜奖(100个):Android双肩背包1个
  • 参与奖(按参赛要求成功提交参赛博客链接 ):Android T-shirt

注意日程,还有一个多月的时间提交博文。

有兴趣请email我:cvchina.info@gmail.com

7月5日 大赛启动
7月5日~8月15日 参赛者提交参赛作品
8月16日~8月30日 大赛评委评选优秀参赛作品
9月1日~9月15日 优秀参赛作品的网络公投
9月20日 公布获奖名单
9月21日 开始派发奖品

这里有个丕子写的一篇,可作参考。

分类: 新闻 标签: , ,

公司介绍9:plink

2010年4月30日 3 条评论

 

PlinkArt Blog Rotating Header Image

PLink是英国的一个图像检索公司,专注于艺术品的检索,非常有特点的一个小公司。

PLink开发了一个名为PlinkArt的android应用程序,见下图,是Android Development Challenge(ADC)的冠军,由此赢得了google的关注。不久前,PLink的founder宣布他们被google收购了。PLinkArt也不再更新了,PLink的两个founder:Mark Cummins和James Philbin可能要专注于为google goggles增加新的特性了。

demonstartion 1

两位创始人的主页:

Mark Cummins的主页:  http://www.robots.ox.ac.uk/~mjc/

James Philbin的主页: http://www.robots.ox.ac.uk/~james/

两人都是牛津刚毕业的博士,我只能说太牛逼了。

官方网站官方博客媒体报道

zz:在android上编译opencv

2010年4月29日 6 条评论

身体很虚,转载一枚,等买了android手机来试一把。来源

点击下面链接看全文攻略。

阅读全文…

log pow exp近似优化

2010年3月19日 1 条评论

最近搞了一下android开发,牵扯到一些log exp的运算需要优化,考虑到并不需要精确的数值结果,就尝试用一些近似解法代替c库函数,个人目前还没有能力设计这些近似算法,在网上搜集一些资源,跟大家共享一下,兼做笔记备忘。

2的近似算法http://www.musicdsp.org/showone.php?id=91

适用于IEEE 32-bit floating 型,误差在0.1左右。

/ logarithm (2-based) approximation
// by Jon Watte

#include <assert.h>

int floorOfLn2( float f ) {
assert( f > 0. );
assert( sizeof(f) == sizeof(int) );
assert( sizeof(f) == 4 );
return (((*(int *)&f)&0x7f800000)>>23)-0x7f;
}

float approxLn2( float f ) {
assert( f > 0. );
assert( sizeof(f) == sizeof(int) );
assert( sizeof(f) == 4 );
int i = (*(int *)&f);
return (((i&0x7f800000)>>23)-0x7f)+(i&0x007fffff)/(float)0×800000;
}

pow, exp的查表近似算法:http://www.hxa.name/articles/content/fast-pow-adjustable_hxa7241_2007.html

适用于IEEE 32-bit floating 型,可以通过控制查找表的大小来控制精度。相对误差在0.01%~0.02%之间的情形下,查找表大小仅为8KB。

Code

In C (89) (and assuming 32 bit integers), the core is:

const float _2p23 = 8388608.0f;

/**
 * Initialize powFast lookup table.
 *
 * @pTable     length must be 2 ^ precision
 * @precision  number of mantissa bits used, >= 0 and <= 18
 */
void powFastSetTable
(
   unsigned int* const pTable,
   const unsigned int  precision
)
{
   /* step along table elements and x-axis positions */
   float zeroToOne = 1.0f / ((float)(1 << precision) * 2.0f);           /* A */
   int   i;                                                             /* B */
   for( i = 0;  i < (1 << precision);  ++i )                            /* C */
   {
      /* make y-axis value for table element */
      const float f = ((float)pow( 2.0f, zeroToOne ) - 1.0f) * _2p23;
      pTable[i] = (unsigned int)( f < _2p23 ? f : (_2p23 - 1.0f) );

      zeroToOne += 1.0f / (float)(1 << precision);
   }                                                                    /* D */
}

/**
 * Get pow (fast!).
 *
 * @val        power to raise radix to
 * @ilog2      one over log, to required radix, of two
 * @pTable     length must be 2 ^ precision
 * @precision  number of mantissa bits used, >= 0 and <= 18
 */
float powFastLookup
(
   const float         val,
   const float         ilog2,
   unsigned int* const pTable,
   const unsigned int  precision
)
{
   /* build float bits */
   const int i = (int)( (val * (_2p23 * ilog2)) + (127.0f * _2p23) );

   /* replace mantissa with lookup */
   const int it = (i & 0xFF800000) | pTable[(i & 0x7FFFFF) >>           /* E */
      (23 - precision)];                                                /* F */

   /* convert bits to float */
   return *(const float*)( &it );
}

Setting the ilog2 parameter:

  • for pow( 2, val), ilog2 = 1 / log2(2) = 1
  • for pow( e, val), ilog2 = 1 / log(2) = 1.44269504088896
  • for pow(10, val), ilog2 = 1 / log10(2) = 3.32192809488736
  • for pow( r, val), ilog2 = log(r) / log(2) = log(r) * 1.44269504088896

These two functions can easily be put in a small class/module that manages the storage and wraps calls for different radixes.

pow, ln近似算法http://www.hxa.name/articles/content/fast-pow-adjustable_hxa7241_2007.html

适用于IEEE 64-bit double 型。

double pow(double a, double b) {
    int tmp = (*(1 + (int *) &a));
    int tmp2 = (int)(b * (tmp - 1072632447) + 1072632447);
    double p = 0.0;
    *(1 + (int * ) &p) = tmp2;
    return p;
}
最后附送一坨位运算技巧:http://graphics.stanford.edu/~seander/bithacks.html
分类: 新闻, 资源 标签: , , , , ,

Opencv 2010计划

2010年3月9日 6 条评论

OpenCVOpenCVOpenCVOpenCVOpenCVOpenCVOpenCVOpenCVOpenCVOpenCVOpenCVOpenCVOpenCVOpenCV

突然想起八卦一下opencv 2010的计划,找到这个http://opencv.willowgarage.com/wiki/GSOC_OpenCV2010页面。

看来下一个版本(可能)会有更多的非sift的feature,(可能)会有Place recognition ,Ground plane detection,Texture recognition等等用来支持增强现实,(可能)会有更好的gui(缩放,当前点位置,灰度值等等),(可能)会有opengl支持,(可能)truetype字体渲染等等,(可能)会有图像拼接,(可能)会支持android等等。。

下面照抄:

Mentors

  • Background subtraction, based tracking
     Nicolas Saunier, Ph.D.
     Professeur Adjoint / Assistant Professor
     Département des génies civil, géologique et des mines (CGM)
     École Polytechnique de Montréal
    
    http://nicolas.saunier.confins.net
  • Write code that uses QTKit.framework to read videos on Mac OS X.
  • Write GUI code that uses 64bit Carbon.
  • Implement some well known CV algorithms.
     Mark Asbach
     Fraunhofer IAIS
     Schloss Birlinghoven
     Sankt Augustin, Germany
    
    http://mmprec.iais.fraunhofer.de/asbach.html
  • Image stitching and/or image collage
     Gary Bradski
     Senior Scientist, Willow Garage
     Consulting Prof. Stanford U.
      Founder, Technical Content Owner
  • ?
     Vadim Pisarevsky
     OpenCV founding team/Czar
  • HighGUI enhancements:
    • saving/restoring window positions on every platform,
    • advanced image views: zoom, scrolling, displaying position + pixel values
    • OpenGL support
    • truetype text rendering, transparency, gradients etc. (via libcairo? or Qt?)
    • possible cross-platform Qt backend
  • Parallelization of various algorithms using Intel TBB (below are possible candidates):
    • Calonder & One-way descriptors and the related algorithms
    • Dense optical flow
    • HOG-, Haar-, LBP-based object detectors (already threaded using OpenMP)
    • Background/foreground segmentation
     Victor Eruhimov
     OpenCV founding team/Senior Researcher
     Argus/Itseez founder

Ideas from the Core OpenCV Team

  • Make it easy to use computer vision on the Android phone.
    • This may involve some feature processing on the Phone, but also a link with a server (Amazon cloud?) and/or perhaps with ’s own Streetview and map data.
    • We want to enable:
      • Image stitching and placement –
        • can we add an off road trail, biking path, indoor scene or city park to Google Streetview?
      • and Ground plane detection for
        • can we allow game makers to easily overlay a real scene?
      • with geometry — can we allow game makers to augment a simple scene such as a board game with augmented reality overlay?
    • Using:
      • Visual odemetry (using techniques developed at Willow that should be ready by summer)
        • Place recognition
        • Texture + geometry based object recognition, again using techniques
        • Image stitching
  • Image collage
    • Putting image collections into useful summary image collage.
    • Can also work with Android above.
    • Easy to post to web, pdf or other formats.
    • Segmentation.
  • Other functionality:
    • Denoising, motion stabilization, lighting balance, image enhancement
    • Segmentation in video/video effects
    • Substitutes for
    • 3D model capture, silhouetts + strip

请关注这个页面: http://opencv.willowgarage.com/wiki/GSOC_OpenCV2010

Stay tuned.