Question
I am training a set of images to classify it in ANN.But in neural networks how can we train a set of images and how can test image is sent as a input to check the trained images. for example:I have two sets of images...first set contains N number of images(A1, A2,...AN) and second set contains 20 images(B1,B2,...B20)..I need to train the first set images in Neural Network to match each image in the first set one by one with the second set of 20 images and display the name of the image with maximum percentage of matching...for example if A1 match best with B9 then it display A1B9 on text file...how can I do this...I'm new to Neural Network...any sort of help is highly appreciated.please help me with a full example code. Thanks in advance
Expert Answer
John Michell
PhD Expert
Answered Sep 12, 2026
Typically, especially for huge sizes, some form of feature extraction is used to reduce the size of the input.
So, instead of image --> image(:), you get image --> featurevector.
If the number of extracted features is I, then the input matrix for N images has size
[ I N ] = size(input);
Next, if there are c categories with Ni (1=1:c) members each, the corresponding target matrix has N columns from the c dimensional unit matrix eye(c) so that
[ c N ] = size(target), sum(target) = ones(1,N), sum(target') = [ N1, N2, ...Nc], and sum(sum(target)) = sum(sum(target')) = sum(target(:)) = N
100% Run Guarantee
3-Hour Fast-Track Delivery
Need a Custom Version or Complete Simulation for This Problem?
Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.
Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here
Related ann Questions & Solutions
Browse All →
Explore similar technical troubleshooting questions and verified MATLAB solutions:
Ready-to-Run MATLAB & Simulink Projects
Browse All Projects →