In Progress

Optimize Image Transform Function

Optimize an image transform function that uses OpenCV. The objective is to reorganize the OpenCV code into a new function, and reduce the number of steps that this function does to achieve the Image Transform.

PROJECT DESCRIPTION

===================

I have an image processing C++ tool that uses OpenCV to transform images (translate, rotate and scale). This tool works correctly, but it's not efficient.

My Image library defines the images from bottom left, so the first pixel (0, 0) is on the bottom-left corner of the image.

+----------(m,n)

| |

| |

(0,0)--------x

The transform variables are also defined from bottom left so that they are consistent with the image coordinate space.

To do the transformation with OpenCV the Transform function converts the images to OpenCV format, converts the transform matrix to OpenCV format, transforms the OpenCV image, converts the transformed OpenCV image back to my lib image, and finally trims all the transparent pixels out of the new image.

SOURCE CODE

===========

The source code is organized in a cross platform CMake project that can generate projects for any platform or compiler, but I have tested it only in Visual Studio 2015.

The project has 3 libraries:

Image

-----

The image processing library. This library reads and writes images from disk (TGA) and does operations on the images (create, fill, blend). Images are in bottom left order, and have a position defined by two integers. All operations on the Image library understand and use this position.

class Image

This class that defines an image. The image pixels are in RGBA format, and each channel is represented by a floating point value. Images have 4 properties: Size in X, Size in Y, Color Mode (RGBA) which defines the Number of Channels (fixed to 4) and Position in X and Y. The pixel 0,0 is the bottom left pixel.

Image* Transform

The function that takes as input an image, applies a transformation (translation, rotation, scale), and returns a new image. The transform function knows that the images have a Position in X and Y, and transforms the position of the output image too.

OpenCV

------

A snapshot of the OpenCV library.

Test

----

An executable with multiple Test functions that read images from the test/input directory, apply some transformations and blends, and save new images to the test/output directory.

This functions use a CRC32 algorithm on the output images to test if the generated images are correct.

Build the Project

-----------------

To generate the project for your IDE use CMake and generate the binaries to a different directory:

Source code: E:/Temp/ImageProcessing/code

Binaries: E:/Temp/ImageProcessing/vs2015_64b

REQUIREMENTS

============

Optimize the Image* Transform function so that the OpenCV code is copied directly into the transform function, and there is no need to convert the image or matrixes to OpenCV format. This new function should create the output image only once and write to it the transformed pixel values from the in_image.

Image* Transform(const Image* in_image, float translate_x, float translate_y, float rotate, float scale_x, float scale_y)

{

if (rotate != 0.0f || scale_x != 1.0f || scale_y != 1.0f)

{

// Compute the Position and Size of the out_image.

// Transform the in_image and write the resulting pixels to the out_image.

// Trim transparent borders on out_image.

// Translate the position of the out_image

}

else

{

// Copy in_image to out_image

// Translate the position of the out_image

}

}

You can use the OpenCV code and reorganize it in a way that is compatible with the Image library.

The new function should produce the same CRC32 hashes for the output images in the Test executable.

Skills: C++ Programming, Image Processing, Software Architecture

See more: imagemagick convert examples, imagemagick convert png to jpg, imagemagick convert crop, imagemagick convert resize, imagemagick convert quality, google image optimizer tool, optimize images online, imagemagick batch convert, dynamic image php function, swap image using function flash, shopping cart customer friendly image upload function, j2me image transform, image transform using program, image resize function cnet, image resize function website path image

About the Employer:
( 0 reviews ) Canada

Project ID: #15398109

Awarded to:

linhlinhking

Hi, I understand image transformation (affine, homography) very well. I can modify your code in the form of matrix multiplication even without using OpenCV so that your code will be clean and fast. Relevant Skills More

$150 CAD in 4 days
(1 Review)
2.3

11 freelancers are bidding on average $242 for this job

Yknox

Hello, I am Smile Song. I'm interesting your project very well I'm a Good Linux, C++, c#, Python, OpenCV, Math, Java, Algorithm expert. Relevant Skills and Experience I m quite well experienced in these jobs. Let's go More

$206 CAD in 3 days
(518 Reviews)
8.6
$250 CAD in 3 days
(40 Reviews)
6.9
creonsolutions

I am an image processing expert in [url removed, login to view] can see my profile to check my past projects. Relevant Skills and Experience As I can understand from your codes you have used belongs to earlier versions of openCV which More

$250 CAD in 10 days
(17 Reviews)
5.6
gold2star

Hi, Dear Employer! How are you? I have enough experience on /C++, java image processing project development. I am really interested in your project. I am 100% sure i can satisfy your requirements perfectly. User- More

$266 CAD in 3 days
(5 Reviews)
4.1
belgasoft

I can do this project using C++/OpenCV. I am expert in Signal/image processing, machine learning, pattern recognition and computer vision and doing projects in these areas since 2004. Relevant Skills and Experience More

$250 CAD in 7 days
(5 Reviews)
4.7
skfaroo123

Hello sir I have just read your description. I am have strong experience about OpenCV,ImageProcessing. So your project is very easy for me. I am looking forward to discuss. [url removed, login to view] Relevant Skills and Experience Ope More

$200 CAD in 7 days
(1 Review)
1.1
xentrictech2

Hi, i am a full stack mobile & web dev having similar technical skills & experience & have already worked on a similar project before so can do this Ref : [url removed, login to view] Relevant Skills a More

$155 CAD in 3 days
(0 Reviews)
0.0
AlexeySokol

Hi, I'm a computer vision developer for AR systems. Relevant Skills and Experience I can see that you're going to make your own transform functions that work exactly as OpenCV but faster. I'm looking forward to disc More

$277 CAD in 3 days
(0 Reviews)
0.0
tommro

I'm an italian electronic engineer with more than 14 years of work experience. I work as HW designer; FW and SW developer. Competenze ed esperienze rilevanti openCV development Pietre Miliari proposte $500 CAD - Proj More

$500 CAD in 30 days
(0 Reviews)
0.0
bidroid

!!!!!!!!!!!! Hello !!!!!!!!!!!!!!! How are you? I've a great interesting about your project as a computer vision professional who has been specializing in this field for over 10 years. Relevant Skills and Experience More

$155 CAD in 3 days
(0 Reviews)
0.0