필터 지우기
필터 지우기

how to save the pixel location in files

조회 수: 2 (최근 30일)
Amani
Amani 2013년 4월 12일
how to save the pixel location in files my aim is to ground truth thousands of images with the pixel location (position) just Y coordinate , so after reading the image and getting the pixel info (impixelregion) I want to save the position that I click on in a file with the same name as the image name I know that I can save this position by right click and copy it in a file but this is really time consuming with lots of images
thanks

답변 (1개)

Image Analyst
Image Analyst 2013년 4월 12일
Use save() to save in a proprietary binary MATLAB format file. Or you can use fprintf() to save them to a text file.
  댓글 수: 2
Amani
Amani 2013년 4월 12일
yes , I did that , but my problem is how to get the location of the pixel and save it in just one click , by only one click I want this location to be saved in a file //////////// code////////// I = imread(image) impixelinfo p = (a variable to handle the position of pixel that I click on) f = fopen('file','w'); fprint (f, p); fclose(d);
thanks
Image Analyst
Image Analyst 2013년 4월 12일
[x y] = ginput(1); % (x,y) is (column, row), not (row, column)

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Convert Image Type에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by