-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
269 lines (255 loc) · 7.78 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
<html>
<head>
<meta charset="UTF-8">
<title>HDRplus</title>
<link rel='stylesheet prefetch' href='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css'>
<style>
body{
background-color:#03A9F4;
min-width:540px;
}
.title{
width:100%;
}
body{
font-family: Sans-Serif;
color:white;
}
h1 {
margin-top: 20px;
}
h4 {
text-shadow: 0px 3px rgba(77, 77, 77, 0.5);
}
div{
/*border:1px solid black;*/
}
.heading{
width:100%;
}
.signature{
float:left;
margin-left:60%;
padding-left:5px;
padding-bottom:5px;
}
.heading,.signature{
background:rgba(2,2,2,0.4);
border: 1px solid rgba(1,1,1,0);
box-shadow:0px 5px 0px 0px rgba(2,2,2,0.2);
}
.sign{
margin:15px;
}
h4 i td{
color:white;
min-width:2px;
white-space: nowrap;
text-shadow:none;
}
h4 i td:nth-child(odd){
background-color:white;
font-size:26px;
font-weight:bold;
}
h4 i td:nth-child(even){
text-shadow: 2px -3px 2px rgba(77, 77, 77, 0.8);
font-family: 'Pacifico', cursive;
}
.sample-div{
margin-top:40px;
width:150px;
height:150px;
background-color:#fff;
border: 3px solid white;
border-radius: 150px;
color: black;
padding:5px 15px;
display:table;
box-shadow: 0px 0px 8px 5px rgba(22,22,22,0.5);
transition:transform 0.3s ease-in;
}
.sample-div img{
display:table-cell;
position:center;
margin:25px;
}
.test{
margin-top:30px;
}
button{
color:rgb(77,77,77);
}
.container{
width:90%;
margin-top:40px;
height:auto;
}
.log{
margin-top:200px;
}
.empty{
height:30px;
width:100%;
}
.sample-div p{
display:table-cell;
vertical-align:middle;
font-size:1.2em;
}
.sample-div div{
position:absolute;
display: block;
margin-top:10px;
margin-left:45px;
}
#weather_info, #temp_info, #loc_info{
font-size:1.7em;
margin-top:40px;
margin-bottom:20px;
}
#temp_info{
text-decoration:underline;
}
#temp_info:hover{
cursor:pointer;
}
/*-------------------------------------*/
/*-------------------------------------*/
/*-------------------------------------*/
</style>
</head>
<body>
<link href='https://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
<center>
<div class="heading">
<div class="title">
<h1>HDR+</h1>
</div>
</center>
<div class="signature">
<h4><i>
<tr>
<div id="sign" style="float:left;">
</div>
</tr>
</i></h4></div>
</div>
<div class="container">
<center>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6">
<div>
<p style="font-size:1.2em; padding:15px;">HDRplus is a cutting edge handwriting recognition application.
Currently it only supports recognition of handwritten digits.
This is because the Neural Network is currently only trained using handwritten digits data-set as of now.
The applciation works as follows:
The image is first clicked using an Android app(front-end).
The image is then pre-processed to segment, enhance, crop, binarize and resize the image(pre-processing).
The application has a neural network processing engine that perfroms the major identification of a character from the image(processing).
The output is combined with previously recognized data and sent back to the android app UI using a RESTful Web service(web-service).
Currently we are able to obtain a recognition at an average accuracy of 90% provided the Android phone camera is not of a very poor quality.
Minimum Android version - Android 4.0.
Efforts are constantly being made by the team to improve upon the application. We hope you like it! :)</p>
</div>
<div>
<img height="30px" src="http://aiconica.net/previews/ce1d8354f4b693ea77108d396a1fc5e9c73098f418a07c435660adb2e4d2dbfd_100x100.png">
<img style="padding-left:15px;" height="30px" src="http://aiconica.net/previews/d10ab112990facdefce66f287619a98b4a83d72b4b8677cb5a6587181bb7a1d7_100x100.png">
<img style="padding-left:15px;" height="30px" src="http://aiconica.net/previews/3a541b9bbfca6ec47f499f233fe8a8f41bef5aa79eb635816ba31c25fe3b06cd_100x100.png">
</div>
</div>
<div class="col-xs-12 col-sm-6 col-md-6 col-lg-6" style="padding:20px;">
<img style="margin:20px" width="43%" style="min-width:120px;" src="screenshot/sc1.png" alt="screenshot 1">
<img style="margin:20px" width="43%" style="min-width:120px;" src="screenshot/sc2.png" alt="screenshot 2" >
</div>
</center>
</div>
<br>
<script src='https://code.jquery.com/jquery-2.2.4.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js'></script>
<script>
function getSign() {
var sign = document.getElementById("sign");
var name = "Kanak Sharma".split(" ");
sign.innerHTML=" ";
//Adding the name word by word
for (i = 0; i < name.length; i++) {
//Adding the first letter
var newElement = document.createElement('td');
newElement.innerHTML = name[i].charAt(0);
document.getElementById("sign").appendChild(newElement);
// rest of the name
var newElement = document.createElement('td');
newElement.innerHTML = name[i].slice(1)+' ';
document.getElementById("sign").appendChild(newElement);
}
}
//Log for Testing Purposes
/* document.getElementById("log").innerHTML = String(name[i]).charAt[0]+' '; */
$(document).ready( function(){
var colorPallette = ['#03A9F4', '#8BC34A', '#FFA726'];
//light blue, light green, light orange.
$("body").css("background-color",colorPallette[Math.floor(Math.random()*3)]);
document.body.style.color = "white";
getSign();
colorTheText();
letTheSunApproximatelyShine();
});
function colorTheText(){
$('h4 i td:nth-child(odd)').css("color",document.body.style.backgroundColor);
$('.sample-div p').css("color",document.body.style.backgroundColor);
}
function letTheSunShine(){
if (navigator.geolocation){ navigator.geolocation.getCurrentPosition(showLocation,letTheSunApproximatelyShine);
} else {
$('#loc_info').innerHTML = "Browser";
$('#weather_info').innerHTML = "not";
$('#temp_info').innerHTML = "supported.";
}
}
function showLocation(position){
$('#loc_info').html('Lat: '+position.coords.latitude+'&Lon:'+position.coords.longitude);
$.ajax( {
url: 'http://api.openweathermap.org/data/2.5/weather?lat='+position.coords.latitude+'&lon='+position.coords.longitude+'&appid=49a55e72241614fcccc232d5d5dc8395',
success: function(data){
$('#weather_info').html(data.weather[0].main);
tempConvert(data.main.temp+'K'); document.getElementById('weather_iconn').css('background',"url('http://openweathermap.org/img/w/'"+data.weather[0].icon+"'.png')");
},
cache: false
});
}
function letTheSunApproximatelyShine(error){
$.get("http://ipinfo.io", function(response){
$("#loc_info").html(response.city+', '+response.country);
$.ajax( {
url: 'http://api.openweathermap.org/data/2.5/weather?lat='+response.loc.split(",")[0]+'&lon='+response.loc.split(",")[1]+'&appid=49a55e72241614fcccc232d5d5dc8395',
success: function(data){
tempConvert(data.main.temp+'K'); $('#weather_info').html(data.weather[0].main);
document.getElementById('weather_iconn').css('background',"url('http://openweathermap.org/img/w/'"+data.weather[0].icon+"'.png')");
},
cache: false
});
}, "jsonp");
}
function tempConvert(temp){
var degree = Number(temp.slice(0,-1));
switch(temp.slice(-1)){
case 'K'://Kelvin to Celcius
$('#temp_info').html(Math.round(degree - 273.15)+'C');
break;
case 'C'://Celcius to Fahrenheit
$('#temp_info').html(Math.round((degree * 9/5) + 32)+'F');
break;
case 'F'://Fahrenheit to Kelvin
$('#temp_info').html(Math.round((degree - 32) * 5/9 + 273.15)+'K');
break;
default:
$('#temp_info').html("Fetching temp...");
break;
}
}
$('#temp_info').on("click",function(){
tempConvert($('#temp_info').text());
});
</script>
</body>
</html>