Click here to Skip to main content
15,902,841 members
Home / Discussions / Algorithms
   

Algorithms

 
QuestionCan linked list be sorted in O(n) time? Pin
doubtfire4000816-Mar-08 23:24
doubtfire4000816-Mar-08 23:24 
AnswerRe: Can linked list be sorted in O(n) time? Pin
Alan Balkany17-Mar-08 3:24
Alan Balkany17-Mar-08 3:24 
GeneralRe: Can linked list be sorted in O(n) time? Pin
Luc Pattyn17-Mar-08 4:08
sitebuilderLuc Pattyn17-Mar-08 4:08 
AnswerRe: Can linked list be sorted in O(n) time? Pin
Jörgen Sigvardsson14-Jun-08 11:47
Jörgen Sigvardsson14-Jun-08 11:47 
QuestionRotate Images for automatic alignment - suggestions for an algorithm please? Pin
justaudio12-Mar-08 11:53
justaudio12-Mar-08 11:53 
AnswerRe: Rotate Images for automatic alignment - suggestions for an algorithm please? Pin
Skippums13-Mar-08 5:24
Skippums13-Mar-08 5:24 
GeneralRe: Rotate Images for automatic alignment - suggestions for an algorithm please? Pin
justaudio13-Mar-08 9:48
justaudio13-Mar-08 9:48 
AnswerRe: Rotate Images for automatic alignment - suggestions for an algorithm please? Pin
Alan Balkany13-Mar-08 5:24
Alan Balkany13-Mar-08 5:24 
There are actually two problems: Recognizing the alignment of an image, and rotating the image.

Recognizing the alignment depends on the image's features; it can't be done for random content.

For rotation there are a number of options. The simplest is to use the .NET rotation transform. A sophisticated algorithm that doesn't lose or distort pixels is described in a US patent by Thomas Sterling.

A common straightforward approach is to go through each pixel in the destination image, rotate in the reverse direction, and take the pixel at this location in the source image. This approach allows you to optionally blend with neighboring pixels for antialiasing.

Another approach that works well for binary images is to identify lines of consecutive pixels that are the same color in the source image's scan lines, then rotate these lines and draw them into the destination image. If the rotation takes a coordinate "far" from an integer value, a second line can be drawn to patch gaps that appear due to aliasing.
GeneralComputing Binary File Changes Pin
Skippums12-Mar-08 10:24
Skippums12-Mar-08 10:24 
GeneralRe: Computing Binary File Changes Pin
Member 419459326-Mar-08 8:43
Member 419459326-Mar-08 8:43 
QuestionRe: Computing Binary File Changes Pin
Skippums29-Mar-08 17:38
Skippums29-Mar-08 17:38 
GeneralRe: Computing Binary File Changes Pin
Member 419459329-Mar-08 18:27
Member 419459329-Mar-08 18:27 
GeneralRe: Computing Binary File Changes Pin
Member 419459330-Mar-08 6:48
Member 419459330-Mar-08 6:48 
QuestionRe: Computing Binary File Changes Pin
Skippums30-Mar-08 10:37
Skippums30-Mar-08 10:37 
GeneralRe: Computing Binary File Changes Pin
Member 419459330-Mar-08 12:38
Member 419459330-Mar-08 12:38 
GeneralRe: Computing Binary File Changes Pin
Member 419459316-Apr-08 16:19
Member 419459316-Apr-08 16:19 
GeneralRe: Computing Binary File Changes Pin
Skippums16-Apr-08 17:39
Skippums16-Apr-08 17:39 
GeneralRe: Computing Binary File Changes Pin
Member 419459316-Apr-08 18:50
Member 419459316-Apr-08 18:50 
GeneralRe: Computing Binary File Changes Pin
Skippums18-Apr-08 6:38
Skippums18-Apr-08 6:38 
GeneralRe: Computing Binary File Changes Pin
Member 419459327-Apr-08 8:25
Member 419459327-Apr-08 8:25 
GeneralRe: Computing Binary File Changes Pin
Skippums27-Apr-08 22:17
Skippums27-Apr-08 22:17 
GeneralRe: Computing Binary File Changes Pin
Member 419459328-Apr-08 15:34
Member 419459328-Apr-08 15:34 
GeneralSegment selected region from the video frames Pin
ptr_Electron12-Mar-08 3:17
ptr_Electron12-Mar-08 3:17 
QuestionAlgorithm performance comparison question Pin
Nick Alexeev8-Mar-08 16:32
professionalNick Alexeev8-Mar-08 16:32 
GeneralRe: Algorithm performance comparison question Pin
Skippums13-Mar-08 5:36
Skippums13-Mar-08 5:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.