I am new to MatLab. I am trying to do some work on image processing. I want to find element’s indexes in a matrix. If this is my matrix:
A =
92 99 1 8 15 67 74 51 58 40
98 80 7 14 16 73 55 57 64 41
4 81 88 20 22 54 56 63 70 47
85 87 19 21 3 60 62 69 71 28
86 93 25 2 9 61 68 75 52 34
17 24 76 83 90 42 49 26 33 65
23 5 82 89 91 48 30 32 39 66
79 6 13 95 97 29 31 38 45 72
10 12 94 96 78 35 37 44 46 53
11 18 100 77 84 36 43 50 27 59
Then I want to find the indexes of elements which are greater than 50. I know one way to do it is by loops but that is very expensive if I do it on 512 X 512 or greater images.
Is there any other way? Actually I want to find it because I have an image in which there is a plain background and there is a person in it. So I want to find the points where there is a change in that plain background. Any help would be appreciated.
You can use
findfor your task