i have a jpg image.i want to find vegetative area and count trees in that image.im able to count trees but for finding veg i hav used mathworks demo im getting error in CIR = multibandr​ead('paris​.lan', [512, 512, 7], 'uint8=>uint8',...

1 view (last 30 days)
i have a jpg image.i want to find vegetative area and count trees in that image.im able to count trees but for finding veg i hav used mathworks demo im getting error in CIR = multibandread('paris.lan', [512, 512, 7], 'uint8=>uint8',... plzz help me to find vegatation in jpg image with example

Answers (3)

madhuri kalapala
madhuri kalapala on 24 Aug 2012
I want to find vegetation in jpg image and then count no.of trees.I got count of trees if buildings exist they are also being counted. plzz help me with a suggestion.iam sending u the image.i hav tried mathworks demo of finding vegetation in multispectral image but im getting error in
CIR = multibandread('paris.lan', [512, 512, 7], 'uint8=>uint8',... 128, 'bil', 'ieee-le', {'Band','Direct',[4 3 2]}); when im using jpg image. help me for the image link http://www.projectblessings.org/project_details.php?pid=59

madhuri kalapala
madhuri kalapala on 25 Aug 2012
Edited: Walter Roberson on 25 Aug 2012
Error in ==> vegarea at 35
CIR = multibandread('sat.jpg', [512, 512, 3], 'uint8=>uint8',...128, 'bil', 'ieee-le', {'Band','Direct',[4 3 2]});
the error for bands i think i hav given 3 bands but its not working.what must be the bytes for this jpg image
  3 Comments
madhuri kalapala
madhuri kalapala on 29 Aug 2012
??? Error using ==> multibandread at 119 The file is too small to contain the specified data.Check the size, offset, and precision arguments.
Error in ==> ipexndvi at 35 CIR = multibandread('G:\tree1\tree1\sat.jpg', [594, 704, 3], 'uint8=>uint8',...
Walter Roberson
Walter Roberson on 29 Aug 2012
I have now looked on the projectblessings web site, but I do not see any multiband images there, or anything named paris.lan or sat.jpg ? The images I see on that Tornado Path page have URLs such as http://www.projectblessings.org/store/project_photos/large/project_225.jpg and are plain images rather than satellite images.

Sign in to comment.


Image Analyst
Image Analyst on 29 Aug 2012
The JPEG image probably has only 3 bands, red, green, and blue, it doesn't have bands 4 etc. So you should have
{'Band','Direct',[1 1 3]}
The number in brackets is [startBand, increment, stopBand] so look what happens with your numbers:
>> 4:3:2
ans =
Empty matrix: 1-by-0
No wonder it doesn't work.

Community Treasure Hunt

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

Start Hunting!