camera Zoom changed

念茜 2011-05-13 03:56:08
希望研究过camera的高手指点下,下面是我从zoom 1倍 smoothzoom拖到 8倍的log
在你看来这里有问题么?逻辑问题?可能出在哪里



V/camera (30714): Zoom changed: value=1. stopped=true
D/camera (30714): ^_^ ZOOM_STOPPING
V/camera (30714): Zoom changed: value=2. stopped=true
D/camera (30714): ^_^ ZOOM_STOPPING
V/camera (30714): Zoom changed: value=3. stopped=true
D/camera (30714): ^_^ ZOOM_STOPPING
V/camera (30714): Zoom changed: value=4. stopped=true
D/camera (30714): ^_^ ZOOM_STOPPING
V/camera (30714): Zoom changed: value=5. stopped=true
D/camera (30714): ^_^ ZOOM_STOPPING
V/camera (30714): Zoom changed: value=7. stopped=false
D/camera (30714): ^_^ ZOOM_START
V/camera (30714): Zoom changed: value=8. stopped=false
D/camera (30714): ^_^ ZOOM_START
V/camera (30714): Zoom changed: value=10. stopped=false
D/camera (30714): ^_^ ZOOM_START
V/camera (30714): Zoom changed: value=12. stopped=false
D/camera (30714): ^_^ ZOOM_START
V/camera (30714): Zoom changed: value=15. stopped=false
D/camera (30714): ^_^ ZOOM_START
V/camera (30714): Zoom changed: value=18. stopped=false
D/camera (30714): ^_^ ZOOM_START
V/camera (30714): Zoom changed: value=21. stopped=false
D/camera (30714): ^_^ ZOOM_START
V/camera (30714): Zoom changed: value=24. stopped=false
D/camera (30714): ^_^ ZOOM_START
V/camera (30714): Zoom changed: value=28. stopped=true
D/camera (30714): ^_^ ZOOM_START

...全文
881 54 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
54 条回复
切换为时间正序
请发表友善的回复…
发表回复
fuuckwtu 2011-12-15
  • 打赏
  • 举报
回复
[Quote=引用 53 楼 haojunming 的回复:]

我也遇到这个问题了,给htc手机变焦距可是设置setzoom不起作用,不知道该怎么办?谢谢啊
[/Quote]
同求啊,给htc手机变焦距可是设置setParameters不起作用,中么办
传智二哥 2011-09-20
  • 打赏
  • 举报
回复
我也遇到这个问题了,给htc手机变焦距可是设置setzoom不起作用,不知道该怎么办?谢谢啊
miss_siwei 2011-07-05
  • 打赏
  • 举报
回复
zoom change 发出的值可能和控件有关,如果控件发出的消息需要处理函数处理,在处理函数没有及时结束时消息是不正确的,这很正常。我觉得应该给处理函数加适当的同步机制,检查控件发出的消息是否正常。
i2c这种并联总线,串扰可能性非常大,如果每次启动都挂那就是错误,只有一定几率出现的才叫bug。建议将当个设备拆下来,检测重启N次是否正常
念茜 2011-06-22
  • 打赏
  • 举报
回复
不问问题了 改成散分貼吧唉
念茜 2011-06-12
  • 打赏
  • 举报
回复
[Quote=引用 21 楼 lightsoure 的回复:]
哈哈 我们的摄像头自动对焦 省事,效果也差~
[/Quote]

请问你们的自动对焦,是纯软实现么
ameyume 2011-06-11
  • 打赏
  • 举报
回复
不知楼主有没有去stackoverflow上问问了吗?
哪里牛人比较多,而且是世界性论坛。
念茜 2011-06-11
  • 打赏
  • 举报
回复
[Quote=引用 42 楼 muojie 的回复:]
没有6就没有呗,只要有效果不就行了。
我也遇到过这个问题,但是没管它。
不知道这个smoothzoom是干嘛的。
[/Quote]

不知道干嘛的 你就遇到了……
KG071 2011-06-11
  • 打赏
  • 举报
回复
新手 帮顶 顺便收藏!
longyi007 2011-06-11
  • 打赏
  • 举报
回复

Kevin-K先森 2011-06-11
  • 打赏
  • 举报
回复
来学习···学习···
念茜 2011-06-11
  • 打赏
  • 举报
回复
谢谢雨梦 o(∩_∩)o
念茜 2011-06-11
  • 打赏
  • 举报
回复
[Quote=引用 44 楼 ameyume 的回复:]
不知楼主有没有去stackoverflow上问问了吗?
哪里牛人比较多,而且是世界性论坛。
[/Quote]

我的英文不怎么好 看得懂写不流利
我有考虑若还没有头绪 就去google group android-developers stackoverflow 等等去试试了 还得写篇英语作文-。- 对于我来说 这个工作量不比解bug小
muojie 2011-06-10
  • 打赏
  • 举报
回复
没有6就没有呗,只要有效果不就行了。
我也遇到过这个问题,但是没管它。
不知道这个smoothzoom是干嘛的。
ameyume 2011-06-06
  • 打赏
  • 举报
回复
帮顶下,这个问题貌似只能自己多努力解决了,别人很难帮上忙啊。
念茜 2011-06-06
  • 打赏
  • 举报
回复
我自己再顶一下吧……
念茜 2011-06-04
  • 打赏
  • 举报
回复
[Quote=引用 37 楼 ameyume 的回复:]
引用 36 楼 yiyaaixuexi 的回复:

不如我这样问:
我调节从 zoom 1倍到8倍并不终止任务,而是拖着smoothzoom又回到1倍。犹豫preview速率与用户拖动调焦的速率不一致,比如我已经在调1了,它没有跑完一个过程的8,这个过程的touch的事件怎么分析。
是根据我的目标值随即就回1,还是继续到8的任务?

如果是消息队列的处理机制的话,那就会继续到8的任务,……
[/Quote]

我怎么知道是不是消息队列的处理的呢
念茜 2011-06-04
  • 打赏
  • 举报
回复
又沉了,顶起来
念茜 2011-06-03
  • 打赏
  • 举报
回复
不如我这样问:
我调节从 zoom 1倍到8倍并不终止任务,而是拖着smoothzoom又回到1倍。犹豫preview速率与用户拖动调焦的速率不一致,比如我已经在调1了,它没有跑完一个过程的8,这个过程的touch的事件怎么分析。
是根据我的目标值随即就回1,还是继续到8的任务?
念茜 2011-06-03
  • 打赏
  • 举报
回复
[Quote=引用 32 楼 ameyume 的回复:]
引用 31 楼 yiyaaixuexi 的回复:
Oh my god !

顶者有分 求高人

帮顶,研究下,学习
[/Quote]

谢谢帮顶 T_T
念茜 2011-06-03
  • 打赏
  • 举报
回复
[Quote=引用 33 楼 jim_image 的回复:]
I2C挂了,试一下检查sensor上电时序,再有查一下同一路的I2C设备是否有过载,可以试着去掉设备看看。
[/Quote]


关掉了 G-sensor 和I2C上有可能干扰的其他设备,I2C不会挂了,这个问题已经解决。
但是zoom的stop的标志位还是错乱的,不和逻辑的。这个标致是从底层读取的,我不能人为强行赋值。
加载更多回复(33)
3D Wall FX version 1.0.8.8053 Hello and thank you for using 3D Wall FX. By downloading our FlashXML product you have become part of the FX community and we are very pleased to welcome you and wish you a long-lasting FlashXML experience. The 3D Wall FX's features are: - an engaging new 3D Wall with lots of properties to customize - multiple types of wall: inside & outside curvature, flat - customizable number of columns and lines, items spacing, radius, speed - perspective and camera distance from wall variables - customizable movement and tweening functions - blur and glow effects for the images - wall reflection - skinnable scroll bar - different appearance of images upon loading - multiple properties for the tooltip - optionally you can go to an URL on clicking an image instead of enlarging it You can install our component on several platforms, from simple HTML sites to Flash projects. We provide installation instructions for multiple platforms, including video tutorials. - for HTML: www.flashxml.net/3d-wall.html#swmi-free-install - for Flash: www.flashxml.net/3d-wall.html#swmi-free-flash - for WordPress: www.flashxml.net/3d-wall.html#swmi-wordpress - for Joomla: www.flashxml.net/3d-wall.html#swmi-joomla - for Facebook: www.flashxml.net/3d-wall.html#swmi-facebook By downloading our 3D Wall FX you have access to one of the most customizable Flash component on the internet. All of our components are XML driven, so there is no need to use Adobe Flash to change the component's attributes or its assets. The easiest way to start customizing our product is with its LiveDemo, which has all the component's attributes available. To read more about how Flash components work with XML files, and get a good understanding of how our components work please visit this FAQ: www.flashxml.net/short-explanation-on-how-fx-components-read-xml-files.html Most of our users want to use our component from a different folder than the location of the HTML page. To see how to embed a component that's in a different folder than your page please read www.flashxml.net/path-issues-with-swf-files-configured-via-xml.html Since most of our users need to use special characters in their text fields we have created a special FAQ just for this: www.flashxml.net/special-characters-for-fx-components.html Answers to the most common questions and problems of our users are also provided on the FAQ section from our website. You can find it here: www.flashxml.net/faq/. We take pride in offering the best support service on the internet, so we are offering free support for all our files regarding bug fixes and basic integration of these files into common environments. For bug reports and requests which do not involve elaborate work please contact our Support Department: support@flashxml.net Our support's working hours are Monday to Friday Europe 08:00 AM - 04:00 PM CET US 02:00 AM - 10:00 AM EST Version 1.0.8.8053 - 24-Jan-12 - fixed issue with stage align and scale mode Version 1.0.7.7470 - 04-Oct-11 - fixed an issue with preloader Version 1.0.6.7465 - 03-Oct-11 - fixed an issue with scrollbar repositioning Version 1.0.5.5069 - 05-May-11 - replaced lightbox with colorbox Version 1.0.4.4362 - 04-Mar-11 - changed the name of image tag to photo tag in images.xml Version 1.0.3.4054 - 14-Feb-11 - renamed the widthComponent and heightComponent attributes from settings.xml to componentWidth and componentHeight, respectively Version 1.0.2.3399 - 11-Jan-11 - fixed flashvars.settingsXML issue Version 1.0.1.3102 - 22-Dec-10 - renamed the imagesXML attribute to assets attribute in the settings.xml - moved preloaders and scrollbars to assets folder - changed the attribute's structure from images.xml This is a list with all the product's attributes and a short description about what each attribute does: componentWidth - 3D wall's width componentHeight - 3D wall's height backgroundColor - background color (set to 0 for transparent background) preloader - loading animation useColorbox - use the image pop-out effect on click typeOfWall - 3D wall type cameraPerspectiv - camera's vertical adjustment posX - wall's horizontal position posY - wall's vertical position lines - number of image rows in the wall columns - number of image columns in the wall radius - the wall's radius spacingH - distance between the image rows spacingV - distance between the image columns speedMove - rotation speed on mouse drag of the wall speedWheel - zoom speed when using the mouse wheel farDistFromWall - camera's distance from the wall nearDistFromWall - zoom amount on image click typeLoader - image loading animation's direction funcLoader - image loading animation type methLoader - image loading animation's behavior timeLoader - image loading animation's duration alpha - opacity of bottom images' reflection ratio - size of bottom images' reflection distance - reflection's distance from bottom images goToUrlOnClick - go to URL on image click positionPlane - position of camera's plane funcCamera - camera zoom animation type methCamera - camera zoom animation's behaviour timeCamera - camera zoom animation's duration funcPlane - plane's animation type methPlane - plane's animation behavior timePlane - duration of plane's animation useBlur - apply a blur effect to the image wall blur - blur intensity useGlow - show image's glow effect on mouse over useInner - image's glow position on mouse over glowStrength - glow effect's color strength on mouse over glowColor - image's glow color on mouse over glowAlpha - image's glow opacity on mouse over glow - image's glow size on mouse over type_Bar - scrollbar's skin width - scrollbar's width positionY - scrollbar's vertical position toolOffSet - text field's position functionEasy - text field's appearance animation appearance - text field's appearance direction tweenTime - duration of text field's animation padding - text field's padding backColor - text field's 1st background color backColor2 - text field's 2nd background color backAlpha - text field's background opacity cornerRadius - text field's corner adjustment toolDistance - text field's vertical adjusment hookSize - text field's arrow size borderThickness - text field's border width borderColor - text field's border color fontFace - text's font type fontColor - text's font color fontSize - text's font size
使用画廊做的一个带有倒影的画廊 package com.action; import android.content.Context; import android.graphics.Camera; import android.graphics.Matrix; import android.util.AttributeSet; import android.view.View; import android.view.animation.Transformation; import android.widget.Gallery; import android.widget.ImageView; public class GalleryFlow extends Gallery { /** * Graphics Camera used for transforming the matrix of ImageViews */ private Camera mCamera = new Camera(); /** * The maximum angle the Child ImageView will be rotated by */ private int mMaxRotationAngle = 60; /** * The maximum zoom on the centre Child */ private int mMaxZoom = -120; /** * The Centre of the Coverflow */ private int mCoveflowCenter; public GalleryFlow(Context context) { super(context); this.setStaticTransformationsEnabled(true); } public GalleryFlow(Context context, AttributeSet attrs) { super(context, attrs); this.setStaticTransformationsEnabled(true); } public GalleryFlow(Context context, AttributeSet attrs, int defStyle) { super(context, attrs, defStyle); this.setStaticTransformationsEnabled(true); } /** * Get the max rotational angle of the image * * @return the mMaxRotationAngle */ public int getMaxRotationAngle() { return mMaxRotationAngle; } /** * Set the max rotational angle of each image * * @param maxRotationAngle * the mMaxRotationAngle to set */ public void setMaxRotationAngle(int maxRotationAngle) { mMaxRotationAngle = maxRotationAngle; } /** * Get the Max zoom of the centre image * * @return the mMaxZoom */ public int getMaxZoom() { return mMaxZoom; } /** * Set the max zoom of the centre image * * @param maxZoom * the mMaxZoom to set */ public void setMaxZoom(int maxZoom) { mMaxZoom = maxZoom; } /** * Get the Centre of the Coverflow * * @return The centre of this Coverflow. */ private int getCenterOfCoverflow() { return (getWidth() - getPaddingLeft() - getPaddingRight()) / 2 + getPaddingLeft(); } /** * Get the Centre of the View * * @return The centre of the given view. */ private static int getCenterOfView(View view) { return view.getLeft() + view.getWidth() / 2; } /** * {@inheritDoc} * * @see #setStaticTransformationsEnabled(boolean) */ protected boolean getChildStaticTransformation(View child, Transformation t) { final int childCenter = getCenterOfView(child); final int childWidth = child.getWidth(); int rotationAngle = 0; t.clear(); t.setTransformationType(Transformation.TYPE_MATRIX); if (childCenter == mCoveflowCenter) { transformImageBitmap((ImageView) child, t, 0); } else { rotationAngle = (int) (((float) (mCoveflowCenter - childCenter) / childWidth) * mMaxRotationAngle); if (Math.abs(rotationAngle) > mMaxRotationAngle) { rotationAngle = (rotationAngle < 0) ? -mMaxRotationAngle : mMaxRotationAngle; } transformImageBitmap((ImageView) child, t, rotationAngle); } return true; } /** * This is called during layout when the size of this view has changed. If * you were just added to the view hierarchy, you're called with the old * values of 0. * * @param w * Current width of this view. * @param h * Current height of this view. * @param oldw * Old width of this view. * @param oldh * Old height of this view. */ protected void onSizeChanged(int w, int h, int oldw, int oldh) { mCoveflowCenter = getCenterOfCoverflow(); super.onSizeChanged(w, h, oldw, oldh); } /** * Transform the Image Bitmap by the Angle passed * * @param imageView * ImageView the ImageView whose bitmap we want to rotate * @param t * transformation * @param rotationAngle * the Angle by which to rotate the Bitmap */ private void transformImageBitmap(ImageView child, Transformation t, int rotationAngle) { mCamera.save(); final Matrix imageMatrix = t.getMatrix(); final int imageHeight = child.getLayoutParams().height; final int imageWidth = child.getLayoutParams().width; final int rotation = Math.abs(rotationAngle); // 在Z轴上正向移动camera的视角,实际效果为放大图片。 // 如果在Y轴上移动,则图片上下移动;X轴上对应图片左右移动。 mCamera.translate(0.0f, 0.0f, 100.0f); // As the angle of the view gets less, zoom in if (rotation < mMaxRotationAngle) { float zoomAmount = (float) (mMaxZoom + (rotation * 1.5)); mCamera.translate(0.0f, 0.0f, zoomAmount); } // 在Y轴上旋转,对应图片竖向向里翻转。 // 如果在X轴上旋转,则对应图片横向向里翻转。 mCamera.rotateY(rotationAngle); mCamera.getMatrix(imageMatrix); imageMatrix.preTranslate(-(imageWidth / 2), -(imageHeight / 2)); imageMatrix.postTranslate((imageWidth / 2), (imageHeight / 2)); mCamera.restore(); } }

80,471

社区成员

发帖
与我相关
我的任务
社区描述
移动平台 Android
androidandroid-studioandroidx 技术论坛(原bbs)
社区管理员
  • Android
  • yechaoa
  • 失落夏天
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧