About 119,000 results
Open links in new tab
  1. Algorithm to rotate an image 90 degrees in place? (No extra …

    In an embedded C app, I have a large image that I'd like to rotate by 90 degrees. Currently I use the well-known simple algorithm to do this. However, this algorithm requires me to make another copy of the image. I'd like to avoid allocating memory for a copy, I'd rather rotate it in-place. Since the image isn't square, this is tricky.

  2. algorithm - Java rotation of pixel array - Stack Overflow

    Apr 20, 2015 · I have tried to make an algorithm in java to rotate a 2-d pixel array(Not restricted to 90 degrees), the only problem i have with this is: the end result leaves me with dots/holes within the image.

  3. c++ - Rotating a 2D pixel array by 90 degrees - Stack Overflow

    May 22, 2013 · So I am trying to rotate it again by 90 degrees to have the correct image. I've tried a transpose algorithm, by changing data[x][y] to data[y][x] , but I don't think that's the correct way. Can anyone guide me what can I do to have it rotated?

  4. Rotate a Rectangular Image by 90 Degree Clockwise

    Oct 4, 2024 · Given an image represented by m x n matrix, rotate the image by 90 degrees in clockwise direction. Please note the dimensions of the result matrix are going to n x m for an m x n input matrix. Another Example: We mainly need to move first row elements to last column, second row elements to second last column.

  5. Rotate Image - AlgoBreath

    Understanding this problem from first principles involves delving into arrays, matrix manipulation, and the geometric implications of rotation. Basic Principles. Image Representation: In computer memory, images are typically represented as a 2D matrix (or array) of pixels. Each pixel contains color information, and the position of each pixel ...

  6. algorithms - Constructing a Pixel Image from Rectangles and …

    The most recent challenge on Advent of Code involves constructing an image in a binary pixel array from a sequence of instructions: rect AxB, which sets all of the pixels in a rectangle A pixels wide by B tall at the top left corner of the array. rotate row y=A by B, which performs a circular rotation of row A by B pixels.

  7. Rotating an image recursively. One of my favorite algorithms!

    Sep 26, 2020 · You could parameterise the rotate function with a number of divisions. Start with 4, then call rotate with 16, then with 64, until each division is a single pixel. You could also make the process of doing 4 rotations at once, or 16 at once recursive with the single base case.

  8. Array Rotations and Algorithm Design - blog.heycoach.in

    Jan 15, 2025 · In programming, array rotation involves shifting the elements of an array to the left or right. Here’s a quick breakdown: Left Rotation: Shifting elements to the left. Think of it as moving your favorite T-shirt to the front of the closet. Right Rotation: Shifting elements to the right.

  9. c# - What is a good way to rotate a pixel array? - Stack Overflow

    Does the .NET framework provide a good way to rotate a pixel array? To be more clear, I am not just looking for a way to rotate an image. Instead I want to rotate the underlying pixel array that the image is/will be based on in such a way that I have access to the modified array.

  10. Digital Images Interpolation and Image Rotation - Olympus

    The method of bilinear interpolation employs a four-pixel neighborhood (2 × 2 array, or a pixel set) surrounding the calculated pixel address to obtain a new transformed pixel value.

  11. Some results have been removed
Refresh