how to fix funtion imbinarize error ?

what did I do wrong and how to fix it?

3 Commenti

Leon Phung
Leon Phung il 11 Giu 2018
Modificato: Leon Phung il 11 Giu 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 il 11 Giu 2018
There is a function in your folder named imbinarize. YOu want to use the inbuilt function right?
Leon Phung
Leon Phung il 11 Giu 2018
Modificato: KSSV il 11 Giu 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

Accedi per commentare.

 Risposta accettata

KSSV
KSSV il 11 Giu 2018

1 voto

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

Più risposte (0)

Categorie

Scopri di più su Convert Image Type in Centro assistenza e File Exchange

Prodotti

Release

R2018a

Richiesto:

il 11 Giu 2018

Modificato:

il 11 Giu 2018

Community Treasure Hunt

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

Start Hunting!

Translated by