Click here to Skip to main content
15,885,141 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Greetings all

Console app in c#.

I need to build a big image from a dataset of small images.

and get avg rgb values of tile images and then the avg rgb values of the big image that was generated from the tile images in the dataset.

Firstly how do I build one big image from the tile images in the dataset.
here is the dataset i am using http://www.vision.caltech.edu/Image_Datasets/Caltech101/

Which it the best way to process this for optimal performance.

What I have tried:

I have a console app in c# that detect images in folder and can get AVG RGB values for image files.

I am trying to figure out fastest method for building a mosaic of sorts from the dataset
Posted
Updated 1-Dec-20 10:20am

1 solution

Quote:
I am trying to figure out fastest method for building a mosaic of sorts from the dataset

Don't!
Don't try to find fastest algorithm from scratch, never.
As you are new to this problem, you need to understand how it work.
How to solve the problem:
- First build a solution, don't care about performance.
- Run your program with small datasets and improve the program until result have expected quality.
- Use profiler to understand where program spend time and why.
- Once see where program is doing same thing again and again, think about how you can improve this point.
- Go back to profiler and improve incrementally.

The other solution is to find full blowup algorithm on internet.

Let guess that you will learn much more with first method.

Profiling (computer programming) - Wikipedia[^]
 
Share this answer
 
Comments
Member 13440673 2-Dec-20 4:06am    
Hi Patrice

Thank you kindly for your time.
I understand your approach and will apply it accordingly.
I would like to know how to build the tiled image using c#.
To my understanding I will use bitmap library in c# to create a new image and then set x, y source and destination rectangles for the array of small tiles to get mapped to.
Is this the correct approach? Other than using Bitmap are there any other external libraries I will need to use? This is a very manual approach to this requirement and I am wondering if there is an easier way to build a mosaic using c# in a console application.
Again thank you for your time
Patrice T 2-Dec-20 4:38am    
My approach is a general purpose approach for about any problem. I didn't tried to solve your problem at all.
It look like a safe bet to guess that you will have to deal with bitmaps, scaling and comparison.
You have to find the picture with best matching for any part of mosaic, there not many approach to this.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900