View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
Point Processing Techniques without using inbuilt functions

4.3 | 3 ratings Rate this file 8 Downloads (last 30 days) File Size: 1.54 KB File ID: #41104 Version: 1.1
image thumbnail

Point Processing Techniques without using inbuilt functions


yagnesh (view profile)


03 Apr 2013 (Updated )

computes image negative,basic thresholding,contrast stretching,graylevel slicing with/without back

| Watch this File

File Information

run the code and input different values for different operations like graylevel slicing with/without back ground,basic thresholding operation,image negative,contrast stretching.

Required Products Image Processing Toolbox
MATLAB release MATLAB 8.0 (R2012b)
MATLAB Search Path
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (6)
20 Mar 2014 Arjunsinh Parmar

22 Apr 2013 Divyarajsinh Parmar

18 Apr 2013 shivangi patel

shivangi patel (view profile)

05 Apr 2013 Christian Wuerslin

Hi again,

no worries. What you did is not a mistake after all, it is correct. However, if you are planning on continue working with Matlab in the future you can save yourself a lot of effort by understanding what makes Matlab different from other languages.

Cheers, Christian

Comment only
04 Apr 2013 yagnesh

yagnesh (view profile)

Hi Christian Wuerslin
Thanks ...
u r absolutely right but i forgot that silly mistake.

thanks again will help me lot in future..

Comment only
04 Apr 2013 Christian Wuerslin

Hi Yagnesh,

please be aware, that Matlab is not like C or any other compiled language. Matlab is interpreted at run-time and therefore long scripts (or a lot of loops) are very time-consuming. Matlab solves this by supplying powerful matrix operations. Your code

for i=1:m
for j=1:n

can be simply replaced by

z = (G-1) - y;

What happens is that Matlab automatically detects that y is a matrix of a certain size and returns a a matrix z of the same size. The loops you use are preformed automatically (and way faster). Note that this only works if G is a scalar (in your case) or if G has the same size as y.
The same applies to all loops in your submission. Hope this helps you in future projects.

Comment only
21 Nov 2014 1.1

Updated as a tool box

Contact us