insert circle values in 512x512 matrix

4 visualizzazioni (ultimi 30 giorni)
Douglas Janovik Maliszewski
Modificato: Walter Roberson il 24 Nov 2019
I need create a 512x512 matrix, with the border parts geting the 0 value and the central part of matrix geting 1 value. The goal is create a mask of an image. How I solve this problem?

Risposte (1)

Walter Roberson
Walter Roberson il 24 Nov 2019
Modificato: Walter Roberson il 24 Nov 2019
M = ones(512,512);
M([1 end], :) = 0;
M(:, [1 end]) = 0;

Categorie

Scopri di più su Image Processing Toolbox in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by