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

Fastest way to convert 12bit image to 16bit image
Understanding Retina device CSS Media queries
Why does setting the text of an image to the text of an image with a paintCompression of rle result in a blank image?
Actionscript: resizing bitmapdata with smoothing
Getting temperature from pixel data
Blog Images for Social Sites
Represent video frames as volume in time
Silverlight: Set one image source equal to another
dynamic created images in canvas to h264
Convert RGB image to yuv420 image by matlab
How to overlay TWO images and save them into AN image? (Flash CS5)
matlab size function throw an exception
Wordpress Multi Site Image Issue
Change hidden input onChange checkboxs
How to draw transparent with alpha transparency in Delphi?
Can't get image out with appended numbering - CodeIgniter

Categories

HOME
cakephp
pandas
client
testng
asp.net-core
blogger
mean-stack
xmpp
jsp-tags
filtering
spring-cloud-stream
maven-3
blueprintjs
enterprise-library-5
android-youtube-api
floating-action-button
windows-azure-storage
static-libraries
ups
hapi
jsprit
facebook-page
code-review
excel-vba-mac
beyondcompare
conemu
zapier
abi
ehcache
crosstab
django-storage
poltergeist
react-css-modules
fifo
neo4j-spatial
atlassian-crucible
webkitspeechrecognition
libssl
google-cloud-nl
bosh
winrt-xaml-toolkit
commit
adobe-premiere
streamsets
vapor
ensembles
texmaker
powershell-dsc
mime
unixodbc
import-from-excel
apple-news
auto-update
scrollable
termination
pnotify
yii2-extension
windows-iot-core-10
arrow-keys
eventkit
migradoc
url-pattern
slicknav
nsfilemanager
lttng
nsviewcontroller
testng-dataprovider
hexdump
rhino-servicebus
tform
execute
msys
embedded-code
graph-drawing
dereference
device-orientation
google-style-guide
titanium-modules
code-access-security
navigationservice
elliptic-curve
xceed-datagrid
kgdb
java.nio.file
stxxl
mysqltuner
spring-io
ril
hungarian-algorithm
chronoforms
drools-planner
ocunit
clipper
cisco-jtapi
automount
pendrive
whoosh
libc++
coercion
xmemcached
locationlistener
self-extracting
recent-documents
suppress
xsdobjectgen
boost-smart-ptr
.net-1.0
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