Well, your line LUT.at<cv::Vec3f(i, j)[0] = random_1;
clearly has an error (missing a '>'). But, as I don't use OpenCV, I don't understand why you need template parameters here anyway.
You don't need the k loop, as you aren't using it.
Given that it is OpenCV, is there a more appropriate method of matrix management you might be suggesting? Am I "barking up the wrong tree?".
I don't need templates if I don't need templates. Yes, how do I access if not by the .at().
From what I understand .at() is relatively slower than other approaches.
The other reason for using templated approach was a desire for higher safely. If this is not true?
<cv::Vec3f> -- what do you suggest?
How do you access LUT w/out template parameters above ?
I don't need templates if I don't need templates. Yes, how do I access if not by the .at().
From what I understand .at() is relatively slower than other approaches.
Lets be precise. .at of vectors is notably slower. .at() of some library container may or may not be slow, depending on what it actually does in there.
I don't know openCv, probably should, but I do not. I will leave that to someone with experience. But to me it feels wrong to have some heavy handed thing for a lookup. A lookup should be as close to pure as possible ... an index into memory to fetch a value. Additional junk on top of that is unlikely to speed it up, and rather likely to slow it down. Neither has to be true, but generally speaking, using a fat matrix object that is designed for something completely different is a round peg square hole thing, and your odds of that being ideal are slim. If it does not have to be ideal, that is ok .. code reuse is a thing. I reused a matrix lib to do image processing, which was a sideways shove in and paint over it job ... it worked, and it saved dev time, but it wasn't really the best way to do it. Stuff happens :)
Honestly I feel this way as well. I just want the fastest retrieval possible of LUT values. The lookup will happen in real time while the the LUT creation will be at whatever time it takes to finish. When you were talking about the heavy handedness being for the lookup what alternative, if any, did you have in mind and can you point me there?
I already did, a 1 dimensional table of data with some sort of accessor (equation, pointer magic, whatever) to get at the value you want. A constant sized vector if a C pointer bothers you.
Edit, sorry, that was the other thread.
but the above still stands.