필터 지우기
필터 지우기

Help using Microsoft Paint with Matlab code

조회 수: 10 (최근 30일)
Alon Spinner
Alon Spinner 2018년 8월 16일
댓글: Alon Spinner 2018년 8월 17일
Hi,
I need to have a few hundred photos manually inspected and edited. Certain things need to be blacken out, while others marked in various ways.
I would like to write a script/GUI that will allow me to do the following:
1) Open mspaint
2) load image (uint8 matrix) currently saved in workspace into open window
3) when done editing, close mspaint and save new image into workspace (as uint8 matrix)
to implement this, I wish to know:
  • How to load an image from workspace into an open mspaint session.
  • How to save an image from a mspaint session to workspace as uint8 matrix.
  • How to close mspaint - openning is with "system('mspaint')"
Help would be much appriciated.
Thanks, Alon

채택된 답변

Rik
Rik 2018년 8월 16일
  1. Save the image to a lossless image file (like e.g. png).
  2. use system(sprintf('mspaint "%s"',path_and_file))
  3. use a msgbox or any uiwait to wait for your manual edit
  4. apply the edit in mspaint and hit save
  5. continue code execution, load temp image file back from disk so it is a uint8 again
  댓글 수: 1
Alon Spinner
Alon Spinner 2018년 8월 17일
Hi Rik,
This will work, but I wonder, is there a way to save and close paint by code (given that I know the pathing and name)?

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

추가 답변 (0개)

카테고리

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

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by