image


Contrast enhancement of the image


I am writing the code for a section of the paper shown in the image showing the alogrithm. The section is regarding the contrast enhancement of the image for improving the blurriness. please guide whether it is right!!
The code written in Matlab is as follows.
clear all
close all
I=imread('105.jpg');
figure,imshow(I);
Ir=I(:,:,1);
Ig=I(:,:,2);
Ib=I(:,:,3);
In=(Ir+Ig+Ib)/3;
[r,c]=size(In)
T1=30;
T2=50;
for i=2:r-1
for j=1:c
if((In(i+1,j)-In(i-1,j))>T1)
Ir(i+1,j)=Ir(i+1,j)+T2;
Ir(i-1,j)=Ir(i-1,j)-T2;
Ig(i+1,j)=Ig(i+1,j)+T2;
Ig(i-1,j)=Ig(i-1,j)-T2;
Ib(i+1,j)=Ib(i+1,j)+T2;
Ib(i-1,j)=Ib(i-1,j)-T2;
end
end
end
Iresult(:,:,1)=Ir(:,:,1);
Iresult(:,:,2)=Ig(:,:,1);
Iresult(:,:,3)=Ib(:,:,1);
grayImg=(Iresult);
figure, imshow(grayImg);
I request to please guide me whether the code is written is correct or not as per algorithm is shown in the image.
The image showing the algorithm is image showing contrast enhancement

Related Links

gnuplot: Plot in correct scale & position on top of image
SpringMVC: What is the best strategy to display an Image?
Smooth resize using Titanium's ImageView?
Image not loading through node.js
could numpy.random.poisson be used to add poisson noise to images?
TYPO3 - geting images from a folder using Typoscript
From raw bits to jpeg without writing into a file
How to convert the Cartesian coordinate to image coordinate in FreeType
AppleScript to convert NEF to JPG preserving Creation Date/Time
How to Repeat Images on RDLC Report
error with upload images in Attachments using Croogo and cakephp
Magmi bulk image import (associate by sku)
Image doesn't upload in custom module magento
Place non-transparent pixel collection in center of image
Animated placemark icon in kml Google Earth?
how to write an image file with orientation data as3

Categories

HOME
xamarin
clips
isabelle
fluentd
mockito
relative-path
lodash
sd-card
octobercms
spring-jdbc
malloc
packages
convolution
orchardcms
msp430
iolanguage
ghc
pc
jsdoc
invantive-sql
jtextfield
jquery-ajaxq
web-sql
wkwebview
cultureinfo
claims-based-identity
autosys
qhull
centos6.5
apache-commons-io
uninstall
entitlements
maquette
nouislider
frame
binary-data
http-status-code-503
karaf
google-sites-2016
catel
framemaker
lxd
geopositioning
hexo
fusionpbx
bytecode-manipulation
overlap
mixture-model
theano.scan
graphenedb
gpx
google-datalayer
avconv
user-accounts
pnotify
typescript1.8
knpmenubundle
spring-cache
lync-client-sdk
azure-sdk
py2app
python-stackless
tform
associative-array
browser-link
intel-fortran
icu4j
purge
tableau-online
arcanist
interrupted-exception
mono-embedding
createprocessasuser
notify
streambase
sorl-thumbnail
clicktag
jsonpickle
network-interface
file-copying
titanium-modules
heisenbug
fluentautomation
rebol3
undefined-reference
industrial
dexterity
file-locking
jquery-mobile-dialog
libstdc++
windows-phone-7.1.1
dotnethighcharts
custom-backend
nsobject
krl
xfbml
w3wp.exe
asp.net-mvc-areas
nsviewanimation
w3wp
uiq3

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App