image-rotation

using slider to rotate image in Matlab

荒凉一梦 提交于 2019-12-23 17:36:55
问题 I have a GUI (using GUIDE) in Matlab, this is how it looks: I want to rotate the image using slider and to show the change in real time. I use axes to display the image. how can I do this? EDIT: I'm building OCR application. this is how the plate looks when I'm rotate it, the numbers are totally deformed. thanks. 回答1: Here is an example GUI: function rotationGUI() %# read image I = imread('cameraman.tif'); %# setup GUI hFig = figure('menu','none'); hAx = axes('Parent',hFig); uicontrol('Parent

Rotation of layout changes the co-ordinate of the motion event

Deadly 提交于 2019-12-22 17:46:49
问题 i am cropping a image by the help of a child relative layout and i am moving it by motion event over a parent relative layout(containing image-view to be cropped). ..but when i rotate parent layout (in which i have the image view ) by 90 deg. the behavior of motion event co-ordinate changes,and does not work(drag and zoom of child layout)properly.. please somebody tell me how to fix this..i have done some research and found about the AXIS_ORIENTATION in motionevent class but did not get any

How to force an Android camera to display in portrait mode, or for me to do the rotation instead

◇◆丶佛笑我妖孽 提交于 2019-12-22 08:16:56
问题 I'm new to posting so please be nice! I have looked at practically all the other questions related to this and tried most, but am completely frustrated. I simply want to have my Android phone display the camera in portrait mode, not landscape. I am simply modifying the ImageManipulations sample that is provided with opencv. I'm using opencv 3.01, Android sdk version 23, Android Studio 2.0, and a Nexus 5 phone with Android version 6.0.1. This is 4/28/2016 and this is pretty much the most

Align images based on a detected features in Opencv

ぃ、小莉子 提交于 2019-12-21 06:26:31
问题 Hi I've a base image and other images that I'd like to rotate with the same angle as the base image. this is my base image. this is an example image that I'd like to rotate. here my full code. #include <stdio.h> #include <iostream> #include "opencv2/core/core.hpp" #include "opencv2/features2d/features2d.hpp" #include "opencv2/highgui/highgui.hpp" #include "opencv2/calib3d/calib3d.hpp" #include "opencv2/nonfree/nonfree.hpp" #include "opencv2/imgproc/imgproc.hpp" #define PI 3.14159265 using

How to rotate arrow head in googlemap v2 when we rotate the phone

好久不见. 提交于 2019-12-20 15:31:07
问题 Can anybody help me with how to rotate the arrow head in google map v2? You have seen that in nevigation the arrow head is rotating to the direction we face. I want to implement that to my app. I red about markerOption.rotation(rotation) this seems a static one. I want to rotate the arrow dynamically when I rotate the phone. 回答1: I was able to do that. Its so easy. below is how. This is to read the sensor and get the orientation of the phone. /** * Initialize the sensor manager. */ private

Rotate an Imagewith Animation

一笑奈何 提交于 2019-12-20 09:15:14
问题 What I Have I have an arrow image (like the left one). When the user clicks on it, it should rotate 180 degree with an animation and should look like the right one. What I Have Done private void rotate(float degree, final int toggleV) { final RotateAnimation rotateAnim = new RotateAnimation(0.0f, degree, RotateAnimation.RELATIVE_TO_SELF, 0.5f, RotateAnimation.RELATIVE_TO_SELF, 0.5f); rotateAnim.setDuration(500); toggle.startAnimation(rotateAnim); rotateAnim.setAnimationListener(new Animation

How do I rotate an image in the frequency domain?

若如初见. 提交于 2019-12-19 07:40:22
问题 I've heard that it should be possible to do a lossless rotation on a jpeg image. That means you do the rotation in the frequency domain without an IDCT. I've tried to google it but haven't found anything. Could someone bring some light to this? What I mean by lossless is that I don't lose any additional information in the rotation. And of course that's probably only possible when rotating multiples of 90 degrees. 回答1: You do not need to IDCT an image to rotate it losslessly (note that

Some images are being rotated when resized

你离开我真会死。 提交于 2019-12-18 13:08:53
问题 In a nutshell the purpose of the following code is to resize an image based on the target size and the multiplier (1x, 2x, 3x). This works fine except for some reason I haven't determined some images are being rotated. public void ResizeImage(TargetSize targetSize, ResizeMultiplier multiplier, Stream input, Stream output) { using (var image = Image.FromStream(input)) { // Calculate the resize factor var scaleFactor = targetSize.CalculateScaleFactor(image.Width, image.Height); scaleFactor /=

Transform a frame to be as if it was taken from above using OpenCV

时光总嘲笑我的痴心妄想 提交于 2019-12-18 12:41:28
问题 I am working on a project for estimating a UAV (quadcopter) location using optical-flow technique. I currently have a code that is using farneback algorithm from OpenCV. The current code is working fine when the camera is always pointing to the ground. Now, I want to add support to the case when the camera is not pointing straight down - meaning that the quadcopter now has a pitch / roll / yaw (Euler angles). The quadcopters Euler angles are known and I am searching for a method to compute

Apply one animation to multiple views at the same time

偶尔善良 提交于 2019-12-18 12:10:48
问题 So Id like to rotate a handful of views all at the same time, all using the same rotation specs. The issue is that for some reason the rotation acts differently for the second element. Apparently this has to do with the animation object actually changing state in between those two lines of code. Obviously I could just create a seperate Animation object and apply it, but I feel like there is an easier way (I have about 15 views) Rotates only the first view correctly: Animation rotateAnim =