Can't index images with imageIndex

7 次查看(过去 30 天)
Sapio L
Sapio L 2015-10-26
编辑: Jayanti 2025-4-2
I try to run this code:
queryImage = imread('clutteredDesk.jpg');
queryROI = [130 175 330 365];
Use the imrect function to select an ROI interactively
queryROI = getPosition(imrect)
figure
imshow(queryImage)
rectangle('Position',queryROI,'EdgeColor','yellow')
imageIndex = indexImages(imgSet,'Verbose',false);
imageIDs = retrieveImages(queryImage,imageIndex,'ROI',queryROI)
However, I get such error:
_ *Undefined function 'invertedImageIndex' for input arguments of type 'bagOfFeatures'.
Error in retrieve_images (line 41) imageIndex = invertedImageIndex(bag);*_

回答(1 个)

Jayanti
Jayanti 2025-4-2
编辑:Jayanti 2025-4-2
Hi Sapio,
This error is sometimes produced if you don't have the right toolbox installed for the function. You can try typing following in the command window:
help invertedImageIndex
If it prompts you to have certain toolbox for the function to work, install the toolbox through the link provided.
Hope this will be useful!

类别

Help CenterFile Exchange 中查找有关 Feature Detection and Extraction 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by