/* Developed by Jimmy Hu */
#include <chrono>
#include <execution>
#include <map>
#include <omp.h>
#include <sstream>
#include <tbb/global_control.h>
#include "../base_types.h"
#include "../basic_functions.h"
#include "../image.h"
#include "../image_io.h"
#include "../image_operations.h"
#include "../timer.h"
// remove_extension Function Implementation
// Copy from: https://stackoverflow.com/a/6417908/6667035
std::string remove_extension(const std::string& filename)
{
size_t lastdot = filename.find_last_of(".");
if (lastdot == std::string::npos) return filename;
return filename.substr(0, lastdot);
}
intvoid maingenerate_complex_image_tests(int argc, char* argv[])
{
TinyDIP::Timer timer1;
auto random_complex_image1 =
TinyDIP::generate_complex_image(
TinyDIP::rand(10, 10),
TinyDIP::rand(10, 10));
std::cout << "Random complex image size: " << random_complex_image1.getWidth() << "x" << random_complex_image1.getHeight() << '\n';
std::cout << "Random complex image dimensionality: " << random_complex_image1.getDimensionality() << '\n';
random_complex_image1.print();
}
int main(int argc, char* argv[])
{
TinyDIP::Timer timer1;
generate_complex_image_tests();
return EXIT_SUCCESS;
}
Random complex image size: 10x10
Random complex image dimensionality: 2
(0.8844240309802,0.8363207745) (0.1437797672,0.973126982068) (0.5857541391,0.882252384014) (0.1229858921,0.204055962672) (0.8504940835206,0.344472482384) (0.70006964937,0.83379110899) (0.27153992883,0.16773660257) (0.1705590421169,0.152702690975) (0.37903897506,0.397786362581) (0.613763415112,0.790551650993)
(0.58494385862,0.322341540162) (0.881348435931,0.44909626674) (0.8282090340822,0.249106939691) (0.6242190646598,0.971857407043) (0.503091102873,0.309203489902) (0.17247351485,0.835401983734) (0.600294784026,0.514839881374) (0.985566550912,0.625077416697) (0.91760571402,0.07026690934162) (0.953899936469,0.31212998452)
(0.471246868887,0.837896000198707) (0.513895576647,0.207863407503) (0.050815618223,0.0627124800446) (0.576112630022,0.89503926426) (0.96664495893,0.5388816303) (0.89617675096,0.06246450886127) (0.977775273139,0.225151197433) (0.912504846047,0.873992671209) (0.0823973160573,0.563156406575) (0.135619078908,0.88686429751)
(0.223833338148,0.154534728895) (0.53186339481,0.814356430446) (0.46227359749,0.5651120122478) (0.766398304211,0.114266142009) (0.124594962339,0.499107174089) (0.660563574091,0.1073160177569) (0.525568399281,0.0111204283194) (0.164503973445,0.820454416701) (0.7170740839186,0.878512334491) (0.856204627023,0.579794148123)
(0.223494193928,0.32039516015) (0.0557046906759,0.766013579312) (0.855071114695,0.59652622613) (0.463759198024,0.79485539291) (0.4749227091,0.951517945753) (0.163188802529,0.738183441601) (0.33234714487,0.464227764121) (0.821327065839,0.220606229243) (0.0251075589151,0.579965831745) (0.7839730613892,0.83911952846)
(0.3504560656263,0.980344481777) (0.966346770057,0.987927617461) (0.625537791546,0.0051187383214) (0.48469600609061,0.443646617163) (0.00884911245474,0.283431963633) (0.0170630709438,0.052705243092) (0.375414138417,0.996915736006) (0.89249223,0.2682035196) (0.6557690154476,0.0165074377757) (0.6760230899701,0.0091761320117)
(0.902147499435,0.87961182347) (0.173553316292,0.0997929761439) (0.40632810907,0.457996923709) (0.781212361648,0.7688770705249) (0.519539657706,0.888375526143) (0.598462863371,0.678184803923) (0.398098211954,0.867314253455) (0.819632694857,0.754235914313) (0.0164268983336,0.0969385220962) (0.591103122613,0.808692633516)
(0.388815387504,0.0416513201909) (0.180902411941,0.0505027516121) (0.15778807016,0.1185870558608) (0.282783391722,0.0938206387649) (0.364419421397,0.619536502398) (0.6063590419318,0.757745923201) (0.553541156964,0.90135639464) (0.440895166985,0.389734660141) (0.734187340207,0.493049677165) (0.937807036271,0.16078611554)
(0.661582746185,0.448692631796) (0.60663167071,0.84197942087) (0.403498452643,0.833960341877) (0.8592786094,0.968699241459) (0.918304355874,0.02658130868275) (0.525461158459,0.719894130438) (0.0229587587968,0.8103840338624) (0.99887737882,0.850113620195) (0.1561960410965,0.0697805666004) (0.7660160018716,0.0516797951475)
(0.579071736898,0.410671613944) (0.839861630904,0.918286494962) (0.768512579905,0.227778593296) (0.6168060643072,0.0902639907601) (0.745889156467,0.669156407707) (0.70344419433,0.8253010602593) (0.444779216056,0.55404284544) (0.00545382905882,0.09405930748013) (0.874289336258,0.482519163358) (0.929466655664,0.0675874165356)
Computation finished at TueThu Jun 1719 1614:3059:4356 2025
elapsed time: 0.02878650555367 seconds.