Commit 51ba273a authored by Mehmet Umut Kürtül's avatar Mehmet Umut Kürtül
Browse files

Initial commit

parents
plk.jpg

8.27 KB

clc
clear
close all
alan=zeros(4,1);
k=1;
I = imread('plk.jpg'); %grnty oku
figure, imshow(I); %okunan grnty gsterir
Ig = rgb2gray(I); %renkli grnty gri seviyeye evirir
figure,
subplot(2,2,1), imshow(Ig); %soldaki resim olarak gsterir
Ih = histeq(Ig); %histogram eitleyerek kontrast artrr
subplot(2,2,2), imshow(Ih); %sadaki resim olarak gsterir
figure,
subplot(1,2,1), imhist(Ig); %griye evrilen grnt zerindeki deerlerin dalmn gsterir
subplot(1,2,2), imhist(Ih);
Ie = edge(Ih, 'sobel'); %sobel kenar bulma algoritmasyla kenarlar bulunur
figure,
subplot(1,2,1), imshow(Ie);
Id = imdilate(Ie, strel('diamond',1)); %morfolojik ilem olan geniletme algoritmas
subplot(1,2,2), imshow(Id); %strel yapsal filtre elemandr. morfolojik ilemi hangi ekil ve parametreyle yapacamz gsterir
If = imfill(Id,'holes');%imfiil komutu resimde ukur denilen yerleri doldurur.
figure, imshow(If); %yani gri seviyede veya binary modda aklklar doldurur
[lab, n] = bwlabel(If); % bwlabel komutu resimdeki nesneleri belirler. lab iine nesnelerin pixel deerini
%n iine ka tane nesne olduu atlr
regions = regionprops(lab, 'All');
regionsCount = size(regions, 1) ;
for i = 1:regionsCount
region = regions(i);
RectangleOfChoice = region.BoundingBox;
PlateExtent = region.Extent;
PlateStartX = fix(RectangleOfChoice(1));
PlateStartY = fix(RectangleOfChoice(2));
PlateWidth = fix(RectangleOfChoice(3));
PlateHeight = fix(RectangleOfChoice(4));
if PlateWidth >= PlateHeight*3 && PlateExtent >= 0.7
im2{k} = imcrop(I, RectangleOfChoice);
temp=im2{k};
temp=im2bw(temp);
figure,imshow(temp)
a=regionprops(temp,'Area')
if ~isempty(a)
alan(k,1)=a.Area;
end
% figure,imshow(im2);
k=k+1;
end
end
mx=max(max((alan)));
[x,y]=find(alan==mx);
im3=im2{x};
im3=im2bw(im3);
imshow(im3)
txt=ocr(im3,'Characterset','0123456789ABCDEFGHIJKLMOUPRSTYZ','TextLayout','Block')
\ No newline at end of file
This diff is collapsed.
using System;
using System.Collections.Generic;
using System.Web;
using System.Web.Routing;
using Microsoft.AspNet.FriendlyUrls;
namespace $rootnamespace$
{
public static class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
var settings = new FriendlyUrlSettings();
settings.AutoRedirectMode = RedirectMode.Permanent;
routes.EnableFriendlyUrls(settings);
}
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace $rootnamespace$
{
public partial class Site_Mobile : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
}
}
}
\ No newline at end of file
  • Glad to have the trusted blogging updates for the people who need the help about coding easily grab it here. I’m sure the information on https://bestwritingsclues.com/reviews/elitewritings-review/ blog quite updated and we able to learn something new. Thanks for the wise recommendation keep posting such trusted updates here.

Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment