how to fix funtion imbinarize error ?

what did I do wrong and how to fix it?

3 comentarios

Leon Phung
Leon Phung el 11 de Jun. de 2018
Editada: Leon Phung el 11 de Jun. de 2018
my code:
clc;clear; %
%read image
I = imread('test1.jpg');
figure
imshow(I)
title('Original Image')
BW = imbinarize(I,'adaptive','ForegroundPolarity','dark','Sensitivity',0.4)
figure
imshow(BW)
title('Binary Version of Image')
Command window:
Warning: Image is too big to fit on screen; displaying at 33%
> In images.internal.initSize (line 71)
In imshow (line 336)
In imbinarize (line 11)
Attempt to execute SCRIPT imbinarize as a function:
G:\LAB\MATLAB code ImageProcessing\testing code\imbinarize.m
Error in imbinarize (line 14)
BW = imbinarize(I,'adaptive','ForegroundPolarity','dark','Sensitivity',0.4)
KSSV
KSSV el 11 de Jun. de 2018
There is a function in your folder named imbinarize. YOu want to use the inbuilt function right?
Leon Phung
Leon Phung el 11 de Jun. de 2018
Editada: KSSV el 11 de Jun. de 2018
yes, I was trying to convert an image to 2-D binary so I can use it for finite element and others post processing later on.
I was trying to use the function imbinarize https://www.mathworks.com/help/images/ref/imbinarize.html

Iniciar sesión para comentar.

 Respuesta aceptada

KSSV
KSSV el 11 de Jun. de 2018

1 voto

YOu need to rename the script/ file named as imbinarize which is present in the folder.

Más respuestas (0)

Categorías

Más información sobre Convert Image Type en Centro de ayuda y File Exchange.

Productos

Versión

R2018a

Etiquetas

Preguntada:

el 11 de Jun. de 2018

Editada:

el 11 de Jun. de 2018

Community Treasure Hunt

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

Start Hunting!

Translated by