Convert indexed image to Text that give the exact position of the pixel
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Kandarpa Kachari
am 25 Aug. 2019
Kommentiert: Image Analyst
am 25 Aug. 2019
indexed Image
Graph showing pixel position
Text formate showing position of pixel horizontaly... how can save image like this in given below formate? from paint or other media?
- 45,46,47
- 44,45,46,47,48
- 44,45,46,48
- 44,45,47,48
- 44,46,47,48,50
- 45,46,47,48,50,51
- 25,26,27,44,45,46,47,48,50,51,52,58,59,62,63,64,69,70,71
- 25,26,27,44,45,46,47,50,51,58,59,61,62,63,64,65,68,69,70,71,72
- 26,27,28,29,44,45,46,48,50,52,58,59,60,61,62,64,65,66,67,68,69,71,72,73,74
- 25,27,28,29,30,31,44,45,47,48,51,52,54,55,56,58,59,60,61,65,66,67,68,72,73,74,75
- 25,26,30,31,32,33,41,42,44,46,47,48,50,51,52,54,55,56,58,59,60,66,67,73,74,75,88
- 25,26,27,32,33,34,35,36,38,39,40,41,42,45,46,47,48,50,51,52,54,55,58,59,60,61,65,66,67,68,72,73,74,75,87,88,89
- 15,16,25,26,27,34,35,36,37,39,40,41,42,44,45,46,47,48,50,51,52,54,56,58,59,60,61,62,64,65,66,67,68,69,71,72,73,74,75,86,87,88,89,90
- 14,15,16,17,36,37,38,40,41,42,44,45,46,47,50,51,55,56,58,59,62,63,64,65,68,69,70,71,74,75,85,86,87,89,90,91
- 13,14,15,17,18,37,38,39,41,42,44,45,46,48,50,52,54,55,56,58,60,61,63,64,66,67,69,70,72,73,75,84,85,86,90,91,92
- 4,12,13,14,16,17,18,20,21,22,23,25,26,27,36,38,39,40,42,44,45,47,48,51,52,54,55,56,58,59,62,63,64,65,68,69,70,71,74,75,83,84,85,91,92,93
- 3,4,5,11,12,13,15,17,18,20,21,22,23,25,26,27,29,31,32,33,34,36,37,39,40,41,44,46,47,48,50,51,52,54,55,58,59,60,61,62,64,65,66,67,68,69,71,72,73,74,75,82,83,84,92,93,94
- 2,3,4,5,6,10,11,12,14,15,16,18,20,21,22,23,25,26,27,29,30,32,33,34,36,37,38,40,41,42,45,46,47,50,51,54,56,58,59,60,61,65,66,67,68,72,73,74,75,81,82,83,93,94,95
- 1,2,3,5,6,7,9,10,11,13,14,15,16,17,20,21,22,23,25,26,27,29,30,31,33,34,36,37,38,39,41,42,44,45,46,48,50,52,55,56,58,59,60,66,67,73,74,75,80,81,82,94,95,96
- 2,3,4,5,6,10,11,12,14,15,16,18,20,21,22,23,25,26,27,29,30,32,33,34,36,37,38,40,41,42,45,46,47,50,51,54,56,58,59,60,61,65,66,67,68,72,73,74,75,81,82,83,93,94,95
- 3,4,5,11,12,13,15,17,18,20,21,22,23,25,26,27,29,31,32,33,34,36,37,39,40,41,44,46,47,48,50,51,52,54,55,58,59,60,61,62,64,65,66,67,68,69,71,72,73,74,75,82,83,84,92,93,94
- 4,12,13,14,16,17,18,20,21,22,23,25,26,27,36,38,39,40,42,44,45,47,48,51,52,54,55,56,58,59,62,63,64,65,68,69,70,71,74,75,83,84,85,91,92,93
- 13,14,15,17,18,37,38,39,41,42,44,45,46,48,50,52,54,55,56,58,60,61,63,64,66,67,69,70,72,73,75,84,85,86,90,91,92
- 14,15,16,17,36,37,38,40,41,42,44,45,46,47,50,51,55,56,58,59,62,63,64,65,68,69,70,71,74,75,85,86,87,89,90,91
- 15,16,25,26,27,34,35,36,37,39,40,41,42,44,45,46,47,48,50,51,52,54,56,58,59,60,61,62,64,65,66,67,68,69,71,72,73,74,75,86,87,88,89,90
- 25,26,27,32,33,34,35,36,38,39,40,41,42,45,46,47,48,50,51,52,54,55,58,59,60,61,65,66,67,68,72,73,74,75,87,88,89
- 25,26,30,31,32,33,41,42,44,46,47,48,50,51,52,54,55,56,58,59,60,66,67,73,74,75,88
- 25,27,28,29,30,31,44,45,47,48,51,52,54,55,56,58,59,60,61,65,66,67,68,72,73,74,75
- 26,27,28,29,44,45,46,48,50,52,58,59,60,61,62,64,65,66,67,68,69,71,72,73,74
- 25,26,27,44,45,46,47,50,51,58,59,61,62,63,64,65,68,69,70,71,72
- 25,26,27,44,45,46,47,48,50,51,52,58,59,62,63,64,69,70,71
- 45,46,47,48,50,51
- 44,46,47,48,50
- 44,45,47,48
- 44,45,46,48
- 44,45,46,47,48
- 45,46,47
0 Kommentare
Akzeptierte Antwort
KALYAN ACHARJYA
am 25 Aug. 2019
Bearbeitet: KALYAN ACHARJYA
am 25 Aug. 2019
Gamosa Neki?
Please note you can assign the rows number at the begining of the array. I way to store the all indexing (rows,colm) of non white pixels.
im_test=imread('PAIKOK.png');
[idx1,idx2]=find(im_test==1);
Here idx1 and idx2 store the all color pixel location of the indexed image. Afterwards you can retrive the image by having same size and assign the same color on those idx1 and idx2 position.
Here I have use the for loop just try to display as per your requiremnets. Same the individual column locations in cell array and retrive when it required.
Is this?
im_test=imread('PAIKOK.png');
[rows colm]=size(im_test);
for i=1:rows
[i,idx2]=find(im_test(i,:)==1);
disp(idx2);
end
Partial results:
Hope it gives you sufficient hints!
3 Kommentare
KALYAN ACHARJYA
am 25 Aug. 2019
Bearbeitet: KALYAN ACHARJYA
am 25 Aug. 2019
im_test=imread('PAIKOK.png');
[rows colm]=size(im_test);
diary on;
for i=1:rows
[i,idx2]=find(im_test(i,:)==1);
disp(idx2);
end
diary off;
It automatically save the diary text file in current working directory.
Open it with Note pad/word text
Image Analyst
am 25 Aug. 2019
Or you can just use fopen(), fprintf(), and fclose(), which is what I'd have done.
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!