Questions tagged [image-rotation]

Image rotation is performing a geometric rotation with certain angle on a particular image.

Image rotation is performing a geometric rotation with certain angle on a particular image. An image can be rotated by a positive angle or negative angle, which will rotate the image clockwise or counterclockwise. Rotating an image by 360 degrees or -360 degrees will actually result in the same image as the original image, while rotating on 180 or -180 degrees will display an inverted copy of the original image.

844 questions
3
votes
1 answer

Why image is rotated and resized instead of resized only?

I want to resize image without rotate image This my code. Image temp = image.getScaledInstance(width, height,ImageScale.SCALE_SMOOTH); BufferedImage resized = new BufferedImage(width, height, BufferedImage.TYPE_INT_RGB); Graphics2D g2d =…
iamp.
  • 51
  • 3
3
votes
1 answer

How can I get actual corners point of UIImageView after applying rotation transform

I've applied the rotation transform on the UIImageImage Suppose the actual frame of UIImageView is Frame : (100.0, 360.0, 200.0, 130) The white border is the frame After applying rotation to some degrees the UIImageView returning frame is Frame…
Amit Singh
  • 2,698
  • 21
  • 49
3
votes
2 answers

How do I rotate a 3D spectrum-Image in Digital Micrograph by scripting?

I want to find the equivalent of the rotate(image, degree) script command to rotate around the x or y axis (I only need 90º rotations). I know I can do it using the tool menu but it would be much faster if I could find a command or a function to do…
3
votes
1 answer

Opencv increases image's size after rotation

I am using opencv in python to rotate an image and the original and the resulted images are differrent is somethings, I am doing my transformation through this part of code: img = cv2.imread("image.tif") new_image = cv2.getRotationMatrix2D((cols…
Neweshy
  • 31
  • 4
3
votes
2 answers

Kivy rotation during movement

I'm struggling with how to properly implement simultaneous movement and rotation using Kivy (in python, not kv lang). My goal is to rotate an object so it's facing its destination then move it towards the destination using Animation. Using the code…
3
votes
0 answers

Image rotated in app and firebase (implementing ExifInterface)

I am working on uploading a photo for user profiles. The goal is to have it both show in the app as a preview, and send it to the database. I am able to do that successfully, however some photos are showing rotated 90 degrees. I looked up some…
ImTheNun
  • 167
  • 1
  • 10
3
votes
1 answer

3D Image Rotation Simple ITK Python

I'm trying to rotate a 3D-Image with Simple ITK. Here is my Code: imagetoresize is the original image. The size of the image is (512,512,149) targetimage = imagetoresize origin = imagetoresize.GetOrigin() targetimage =…
Noobie555
  • 33
  • 1
  • 4
3
votes
2 answers

Rotate back an image in opencv c++

I use this code to rotate my image in OpenCV: // get rotation matrix for rotating the image around its center Point2f center22(RGBsrc.cols/2.0, RGBsrc.rows/2.0); Mat rot = getRotationMatrix2D(center22, Angle, 1.0); // determine bounding…
narges
  • 681
  • 2
  • 7
  • 26
3
votes
2 answers

Auto Rotate Picture in Picture Box

My project has a picturebox control for loading pictures, it's working fine. However, some vertical jpg pictures are shown horizontally in Windows Explorer and also in my picturebox control - the same file opened using editors like Photoshop shows a…
3
votes
2 answers

How to scale an image on rotation (using opencv) in java?

I am using below method to rotate an image Mat src in angle degrees, making use of opencv dll to perform this operation. However, the output image needs to be resized and re-scaled. How the scaling factor should be decided depending on rotation…
3
votes
1 answer

Center of the view after rotation or scale

I am trying to find the center of a view. For non-rotated view the value is correct, but for rotated view it's not correct as the centre(0,0) is rotating. In the case of scaling the width and height is keep constant even after zooming I am using the…
DKV
  • 1,767
  • 3
  • 28
  • 49
3
votes
2 answers

Rotate an image to direct to a well know point using compass heading

As a proof of concept, I want to create an application that retrieve the current coordinates, calculate the direction towards an another point and, using compass, rotate an arrow image to direct to that point in space. I know how to retrieve current…
Giordano Scalzo
  • 6,312
  • 3
  • 31
  • 31
3
votes
4 answers

Images are messed up in webkit

On this page http://cacrochester.com/ the 2 rotating images are messed up in webkit browsers. It's not all the time, and it's usually not on the first image. Why is that? I'm using the NivoSlider jquery plugin to rotate the images. here's what i'm…
Catfish
  • 18,876
  • 54
  • 209
  • 353
3
votes
0 answers

How to rotate imageView inside UIScrollView and recalculate contentSize, bounds and frame

I'm struggling with problem in rotating image in a UIScrollView, my view hierarchy is described by: I've an UIScrollView with an UIView as subview. The UIView has an UIImageView as subview. I would be able to rotate the imageView inside it and then…
3
votes
1 answer

How can I make the image always show the correct orientation?

After taking image from camera in landscapeLeft and landscapeRight orientation, image save in landscape mode. Result image is attached. Following is my code and all things I tried: I am using PHPhotoLibrary to save image in custom album. // Take…
Mukesh
  • 777
  • 7
  • 20