| 180 | } |
| 181 | |
| 182 | TupleTensor4 SIFT(Tensor &in, int maxFeatures, int numOctaveLayers, float contrastThreshold, float edgeThreshold, |
| 183 | float initSigma, NVCVSIFTFlagType flags, std::optional<Stream> pstream) |
| 184 | { |
| 185 | auto inAccess = tensorAccess(in); |
| 186 | int numSamples = inAccess->numSamples(); |
| 187 | |
| 188 | maxFeatures = maxFeatures == 0 ? GetDefaultMaxFeatures(inAccess->numCols(), inAccess->numRows()) : maxFeatures; |
| 189 | |
| 190 | // Row align must be 1 in below tensors so last 2 dimensions are packed |
| 191 | |
| 192 | // clang-format off |
| 193 | |
| 194 | Tensor featCoords = Tensor::Create({{numSamples, maxFeatures, 4}, "NMC"}, nvcv::TYPE_F32, 1); |
| 195 | Tensor featMetadata = Tensor::Create({{numSamples, maxFeatures, 3}, "NMC"}, nvcv::TYPE_F32, 1); |
| 196 | Tensor featDescriptors = Tensor::Create({{numSamples, maxFeatures, 128}, "NMD"}, nvcv::TYPE_U8, 1); |
| 197 | Tensor numFeatures = Tensor::Create({{numSamples, 1}, "NC"}, nvcv::TYPE_S32, 1); |
| 198 | |
| 199 | // clang-format on |
| 200 | |
| 201 | return SIFTInto(featCoords, featMetadata, featDescriptors, numFeatures, in, numOctaveLayers, contrastThreshold, |
| 202 | edgeThreshold, initSigma, flags, pstream); |
| 203 | } |
| 204 | |
| 205 | } // namespace |
| 206 |
nothing calls this directly
no test coverage detected