Commit 70a14245 authored by Charuka_IT18114454's avatar Charuka_IT18114454

Interconnected with result genarating system and UI

parent 2f3242c1
......@@ -78,4 +78,5 @@ dependencies {
testImplementation 'junit:junit:4.13.2'
androidTestImplementation 'androidx.test.ext:junit:1.1.2'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
implementation 'com.squareup.okhttp3:okhttp:4.9.0'
}
\ No newline at end of file
......@@ -5,6 +5,10 @@
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
<application
android:allowBackup="true"
......
......@@ -9,6 +9,8 @@ import android.net.Uri;
import android.os.Bundle;
import android.os.Environment;
import android.provider.MediaStore;
import android.text.InputFilter;
import android.text.Spanned;
import android.util.Base64;
import android.view.View;
import android.widget.Button;
......@@ -27,6 +29,8 @@ import com.example.archemistrylab.R;
import com.googlecode.tesseract.android.TessBaseAPI;
import com.theartofdev.edmodo.cropper.CropImage;
import org.jetbrains.annotations.NotNull;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileOutputStream;
......@@ -34,6 +38,14 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import okhttp3.Call;
import okhttp3.Callback;
import okhttp3.FormBody;
import okhttp3.OkHttpClient;
import okhttp3.Request;
import okhttp3.RequestBody;
import okhttp3.Response;
public class ImageProcess extends AppCompatActivity {
......@@ -41,7 +53,8 @@ public class ImageProcess extends AppCompatActivity {
Button btnCapture;
Uri uri;
Bitmap finalbitmap;
TextView textfinal;
TextView textfinal, uppertext;
private String blockCharacterSet = "~#^|$%''&*!";
String FinalDatapath;
......@@ -60,6 +73,7 @@ public class ImageProcess extends AppCompatActivity {
btnCapture = findViewById(R.id.capture);
imageviewUpdate = findViewById(R.id.imageviewUpdate);
textfinal = findViewById(R.id.textfinal);
uppertext = findViewById(R.id.text3);
//start python
if (!Python.isStarted()){
......@@ -89,8 +103,11 @@ public class ImageProcess extends AppCompatActivity {
Bitmap bitmap = null;
try {
bitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(),uri);
//final image of captured
finalbitmap = bitmap;
originalimage.setImageBitmap(bitmap);
uppertext.setText("Your Captured Image:");
}catch (IOException e){
e.printStackTrace();
}
......@@ -200,8 +217,68 @@ public class ImageProcess extends AppCompatActivity {
imageviewUpdate.setImageBitmap(greybmp);
//final srting value
String textfromImage = getOCRresult(greybmp,FinalPathToTESS_BASE_API);
textfinal.setText(textfromImage);
textfinal.setText("Your result is generating....");
System.out.println("your value is :" +textfromImage);
//pass the ocr value to python server
if (textfromImage != null) {
OkHttpClient okHttpClient = new OkHttpClient();
RequestBody formbody = new FormBody.Builder().add("InputEquation", textfromImage).build();
try {
Request request = new Request.Builder().url("https://79e6-35-194-205-80.ngrok.io/equations").post(formbody).build();
okHttpClient.newCall(request).enqueue(new Callback() {
@Override
public void onFailure(@NotNull Call call, @NotNull IOException e) {
runOnUiThread(new Runnable() {
@Override
public void run() {
Toast.makeText(ImageProcess.this, "network not found", Toast.LENGTH_SHORT).show();
textfinal.setText(textfromImage);
}
});
}
@Override
public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {
runOnUiThread(new Runnable() {
@Override
public void run() {
TextView textView = findViewById(R.id.textfinal);
System.out.println("sentpass");
try {
String res=response.body().string();
res= res.replace("\"", "");
textView.setText(res);
} catch (IOException e) {
e.printStackTrace();
}
}
});
}
});
}catch (Exception e){
}
}
}catch (Exception e){
e.printStackTrace();
......@@ -215,7 +292,7 @@ public class ImageProcess extends AppCompatActivity {
e.printStackTrace();
}
tessBaseAPI.init(FinalPathToTESS_BASE_API,"eng");
tessBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST, "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYZ2346789+-=> ");
tessBaseAPI.setVariable(TessBaseAPI.VAR_CHAR_WHITELIST, "aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqrRsStTuUvVwWxXyYZ2346789+-=> ");
tessBaseAPI.setImage(bitmap);
String retStr = "No Result";
try {
......@@ -226,4 +303,16 @@ public class ImageProcess extends AppCompatActivity {
tessBaseAPI.end();
return retStr;
}
private InputFilter filter = new InputFilter() {
@Override
public CharSequence filter(CharSequence source, int start, int end, Spanned dest, int dstart, int dend) {
if (source != null && blockCharacterSet.contains(("" + source))) {
return "";
}
return null;
}
};
}
\ No newline at end of file
def main():
return "Hello World!!!!!-test "
return ""
......@@ -35,10 +35,13 @@ def main(data):
#image = Image.open(np_data)
#pil_im = ImageEnhance.Contrast(image)
#pil_im = cv2.bilateralFilter(img, 15, 75, 75)
#pil_im = cv2.fastNlMeansDenoisingColored(img, None, 10, 10, 7, 15)
pil_im = cv2.GaussianBlur(pil_im,(9,9),9)
pil_im = cv2.medianBlur(pil_im,5)
pil_im = cv2.adaptiveThreshold(pil_im,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,77,10)
pil_im = cv2.adaptiveThreshold(pil_im,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,79,11)
......
<vector android:height="60dp" android:viewportHeight="511.998"
android:viewportWidth="511.998" android:width="60dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#507C5C" android:pathData="M463.142,384.935H337.568c-9.046,0 -16.381,-7.334 -16.381,-16.381c0,-9.047 7.335,-16.381 16.381,-16.381h125.574c8.875,0 16.094,-7.221 16.094,-16.096V18.549c0,-9.047 7.335,-16.381 16.381,-16.381c9.046,0 16.381,7.334 16.381,16.381v317.528C512,363.017 490.082,384.935 463.142,384.935z"/>
<path android:fillColor="#CFF09E" android:pathData="M156.901,276.327l98.786,96.12v106.426c0,12.933 -15.613,19.434 -24.793,10.325L16.381,276.327L230.894,63.454c9.18,-9.109 24.793,-2.608 24.793,10.325v106.426L156.901,276.327z"/>
<path android:fillColor="#507C5C" android:pathData="M354.955,2.168c-9.046,0 -16.381,7.334 -16.381,16.381v149.17h-66.507V73.781c0,-17.069 -13.921,-30.957 -31.031,-30.957c-8.13,0 -15.831,3.198 -21.68,9.005L4.842,264.7C1.743,267.775 0,271.96 0,276.327s1.743,8.553 4.842,11.627l214.513,212.871c5.85,5.805 13.55,9.005 21.68,9.005c17.11,0 31.031,-13.888 31.031,-30.955V372.448c0,-4.423 -1.789,-8.657 -4.957,-11.74l-86.718,-84.38l77.947,-75.846h80.632c17.847,0 32.366,-14.52 32.366,-32.366V18.549C371.336,9.502 364.001,2.168 354.955,2.168zM145.478,288.067l93.827,91.296v95.105L39.635,276.327l199.67,-198.141v95.103l-93.827,91.298c-3.17,3.085 -4.957,7.317 -4.957,11.74C140.521,280.75 142.308,284.985 145.478,288.067z"/>
<path android:fillColor="#507C5C" android:pathData="M407.584,292.708H246.218c-9.046,0 -16.381,-7.334 -16.381,-16.381s7.335,-16.381 16.381,-16.381h161.366c0.903,0 1.636,-0.734 1.636,-1.636V74.803c0,-9.047 7.335,-16.381 16.381,-16.381s16.381,7.334 16.381,16.381V258.31C441.983,277.277 426.553,292.708 407.584,292.708z"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="108dp"
<vector
android:height="108dp"
android:width="108dp"
android:viewportHeight="108"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z" />
<path
android:fillColor="#00000000"
android:pathData="M9,0L9,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,0L19,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,0L29,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,0L39,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,0L49,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,0L59,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,0L69,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,0L79,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M89,0L89,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M99,0L99,108"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,9L108,9"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,19L108,19"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,29L108,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,39L108,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,49L108,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,59L108,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,69L108,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,79L108,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,89L108,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M0,99L108,99"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,29L89,29"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,39L89,39"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,49L89,49"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,59L89,59"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,69L89,69"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M19,79L89,79"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M29,19L29,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M39,19L39,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M49,19L49,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M59,19L59,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M69,19L69,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
<path
android:fillColor="#00000000"
android:pathData="M79,19L79,89"
android:strokeWidth="0.8"
android:strokeColor="#33FFFFFF" />
xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#3DDC84"
android:pathData="M0,0h108v108h-108z"/>
<path android:fillColor="#00000000" android:pathData="M9,0L9,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,0L19,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,0L29,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,0L39,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,0L49,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,0L59,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,0L69,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,0L79,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M89,0L89,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M99,0L99,108"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,9L108,9"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,19L108,19"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,29L108,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,39L108,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,49L108,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,59L108,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,69L108,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,79L108,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,89L108,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M0,99L108,99"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,29L89,29"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,39L89,39"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,49L89,49"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,59L89,59"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,69L89,69"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M19,79L89,79"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M29,19L29,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M39,19L39,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M49,19L49,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M59,19L59,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M69,19L69,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
<path android:fillColor="#00000000" android:pathData="M79,19L79,89"
android:strokeColor="#33FFFFFF" android:strokeWidth="0.8"/>
</vector>
<vector android:height="60dp" android:viewportHeight="512"
android:viewportWidth="512" android:width="60dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#507C5C" android:pathData="M124.303,170.634H33.269c-9.059,0 -16.406,-7.345 -16.406,-16.406s7.346,-16.406 16.406,-16.406h91.033c9.059,0 16.406,7.345 16.406,16.406S133.362,170.634 124.303,170.634z"/>
<path android:fillColor="#CFF09E" android:pathData="M323.67,256L214.66,149.932V32.49c0,-14.271 17.229,-21.447 27.358,-11.394L478.733,256L242.018,490.904c-10.13,10.052 -27.358,2.878 -27.358,-11.394V362.068L323.67,256z"/>
<path android:fillColor="#507C5C" android:pathData="M490.289,244.355L253.574,9.45C247.433,3.357 239.355,0 230.827,0c-17.961,0 -32.572,14.575 -32.572,32.49v117.442c0,4.429 1.791,8.669 4.964,11.758L300.144,256l-87.732,85.366H33.269c-9.059,0 -16.406,7.345 -16.406,16.406s7.346,16.406 16.406,16.406h164.985v105.333c0,17.915 14.611,32.49 32.572,32.49c8.528,0 16.606,-3.357 22.746,-9.45l236.715,-234.906c3.104,-3.079 4.849,-7.273 4.849,-11.645C495.137,251.628 493.393,247.435 490.289,244.355zM231.067,478.656V368.996l104.044,-101.238c3.174,-3.088 4.964,-7.328 4.964,-11.758c0,-4.429 -1.791,-8.67 -4.964,-11.758L231.067,143.005l0.005,-109.661l224.372,222.657L231.067,478.656z"/>
<path android:fillColor="#507C5C" android:pathData="M225.107,272.406H68.836c-9.059,0 -16.406,-7.345 -16.406,-16.406s7.346,-16.406 16.406,-16.406h156.271c9.059,0 16.406,7.345 16.406,16.406S234.166,272.406 225.107,272.406z"/>
</vector>
<vector android:height="60dp" android:viewportHeight="511.999"
android:viewportWidth="511.999" android:width="60dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#507C5C" android:pathData="M92.918,182.171h-78.73C6.353,182.171 0,175.819 0,167.983s6.353,-14.188 14.188,-14.188h78.73c7.835,0 14.188,6.352 14.188,14.188S100.754,182.171 92.918,182.171z"/>
<path android:fillColor="#CFF09E" android:pathData="M265.338,256.001l-94.276,-91.732V62.699c0,-12.342 14.9,-18.548 23.66,-9.854l204.721,203.154L194.722,459.153c-8.761,8.693 -23.66,2.489 -23.66,-9.854V347.731L265.338,256.001z"/>
<path android:fillColor="#507C5C" android:pathData="M507.806,245.929L303.085,42.774c-5.562,-5.521 -14.546,-5.485 -20.066,0.077c-5.519,5.562 -5.484,14.546 0.078,20.065l194.572,193.083L283.618,448.561v-57.634l125.82,-124.857c2.684,-2.663 4.194,-6.29 4.194,-10.071c0,-3.781 -1.51,-7.408 -4.194,-10.071L204.718,42.773c-5.312,-5.269 -12.298,-8.172 -19.673,-8.172c-15.532,0 -28.169,12.605 -28.169,28.098v101.569c0,3.831 1.549,7.498 4.293,10.169l83.825,81.563l-75.875,73.828H14.188C6.353,329.827 0,336.179 0,344.015c0,7.836 6.353,14.188 14.188,14.188h142.686V449.3c0,15.493 12.637,28.098 28.169,28.098c7.375,0 14.361,-2.901 19.673,-8.172l50.524,-50.138v30.214c0,11.37 6.782,21.542 17.278,25.913c3.507,1.46 7.179,2.171 10.818,2.171c7.253,0 14.371,-2.825 19.747,-8.158l204.721,-203.156c2.684,-2.663 4.194,-6.29 4.194,-10.071C511.999,252.22 510.49,248.593 507.806,245.929zM185.25,448.562v-94.838l89.983,-87.555c2.745,-2.67 4.293,-6.338 4.293,-10.169c0,-3.831 -1.549,-7.498 -4.293,-10.169l-89.983,-87.554l0.004,-94.841l194.047,192.564L185.25,448.562z"/>
<path android:fillColor="#507C5C" android:pathData="M180.098,270.189H44.948c-7.835,0 -14.188,-6.352 -14.188,-14.188c0,-7.836 6.353,-14.188 14.188,-14.188h135.15c7.835,0 14.188,6.352 14.188,14.188C194.287,263.837 187.933,270.189 180.098,270.189z"/>
</vector>
<vector android:height="60dp" android:viewportHeight="394.497"
android:viewportWidth="394.497" android:width="60dp" xmlns:android="http://schemas.android.com/apk/res/android">
<path android:fillColor="#FF000000" android:pathData="M181.239,84.373c-30.412,30.413 -30.412,79.896 0,110.309c15.206,15.206 35.18,22.809 55.154,22.809s39.948,-7.603 55.154,-22.809c30.412,-30.413 30.412,-79.896 0,-110.309C261.136,53.961 211.651,53.961 181.239,84.373zM295,174.026v-68.998C307.48,126.239 307.48,152.817 295,174.026zM285,91.994v95.067c-0.177,0.181 -0.343,0.37 -0.522,0.55c-26.514,26.512 -69.652,26.514 -96.168,0c-3.953,-3.953 -7.302,-8.281 -10.076,-12.862H184c2.762,0 5,-2.239 5,-5s-2.238,-5 -5,-5h-10.747c-3.926,-9.869 -5.447,-20.475 -4.576,-30.92H208c2.762,0 5,-2.239 5,-5s-2.238,-5 -5,-5h-37.742c2.653,-11.26 8.213,-21.961 16.66,-30.92H251c2.762,0 5,-2.239 5,-5s-2.238,-5 -5,-5h-52.269c11.361,-7.562 24.51,-11.349 37.662,-11.349c17.413,0 34.827,6.628 48.084,19.885C284.657,91.624 284.823,91.813 285,91.994z"/>
<path android:fillColor="#FF000000" android:pathData="M389.225,266.902l-72.44,-72.44c11.022,-16.057 16.958,-35.038 16.958,-54.935c0,-26.002 -10.127,-50.449 -28.514,-68.835c-7.583,-7.583 -16.125,-13.624 -25.229,-18.177V7.749c0,-2.761 -2.238,-5 -5,-5H55.69c-1.326,0 -2.598,0.527 -3.535,1.464l-50.69,50.68C0.527,55.831 0,57.103 0,58.429v328.32c0,2.761 2.238,5 5,5h270c2.762,0 5,-2.239 5,-5V226.54c3.882,-1.941 7.658,-4.157 11.303,-6.649l72.467,72.467c3.509,3.509 8.117,5.264 12.728,5.264c4.608,0 9.219,-1.755 12.728,-5.264c3.4,-3.399 5.272,-7.92 5.272,-12.728C394.497,274.822 392.625,270.302 389.225,266.902zM323.742,139.527c0,23.332 -9.086,45.267 -25.584,61.764c-34.059,34.058 -89.471,34.057 -123.529,0c-16.498,-16.498 -25.584,-38.433 -25.584,-61.764s9.086,-45.267 25.584,-61.764c17.029,-17.028 39.396,-25.542 61.765,-25.542s44.735,8.514 61.765,25.542C314.656,94.261 323.742,116.196 323.742,139.527zM50.69,19.817v33.611H17.073L50.69,19.817zM270,381.749H10V63.429h45.69c2.762,0 5,-2.239 5,-5v-45.68H270v35.448c-34.511,-12.638 -74.79,-5.156 -102.441,22.496c-6.161,6.161 -11.389,13.005 -15.625,20.357h-46.932c-2.762,0 -5,2.239 -5,5s2.238,5 5,5h41.922c-2.822,6.557 -4.91,13.424 -6.224,20.5H48.5c-2.762,0 -5,2.239 -5,5s2.238,5 5,5h90.871c-0.213,2.64 -0.326,5.301 -0.326,7.979c0,4.222 0.271,8.401 0.797,12.521H93c-2.762,0 -5,2.239 -5,5s2.238,5 5,5h48.656c1.676,7.109 4.145,13.978 7.364,20.5H48.5c-2.762,0 -5,2.239 -5,5s2.238,5 5,5h106.222c3.678,5.64 7.964,10.941 12.836,15.814c1.642,1.642 3.343,3.186 5.07,4.686H155.5c-2.762,0 -5,2.239 -5,5s2.238,5 5,5h30.89c15.335,9.179 32.667,13.781 50.004,13.781c11.394,0 22.781,-2.006 33.606,-5.971V381.749zM305.229,208.363c1.899,-1.899 3.705,-3.866 5.426,-5.89l51.275,51.275l-11.314,11.314l-51.295,-51.295C301.341,212.053 303.322,210.269 305.229,208.363zM382.154,285.287c-3.119,3.119 -8.195,3.119 -11.314,0l-13.154,-13.154L369,260.819l13.154,13.154c1.511,1.511 2.343,3.52 2.343,5.657S383.665,283.776 382.154,285.287z"/>
<path android:fillColor="#FF000000" android:pathData="M48.5,101.049h40.001c2.762,0 5,-2.239 5,-5s-2.238,-5 -5,-5H48.5c-2.762,0 -5,2.239 -5,5S45.738,101.049 48.5,101.049z"/>
<path android:fillColor="#FF000000" android:pathData="M48.5,162.049h27.501c2.762,0 5,-2.239 5,-5s-2.238,-5 -5,-5H48.5c-2.762,0 -5,2.239 -5,5S45.738,162.049 48.5,162.049z"/>
<path android:fillColor="#FF000000" android:pathData="M48.5,223.049h92.301c2.762,0 5,-2.239 5,-5s-2.238,-5 -5,-5H48.5c-2.762,0 -5,2.239 -5,5S45.738,223.049 48.5,223.049z"/>
<path android:fillColor="#FF000000" android:pathData="M231.5,243.549H86.501c-2.762,0 -5,2.239 -5,5s2.238,5 5,5H231.5c2.762,0 5,-2.239 5,-5S234.262,243.549 231.5,243.549z"/>
<path android:fillColor="#FF000000" android:pathData="M48.5,253.549h22.001c2.762,0 5,-2.239 5,-5s-2.238,-5 -5,-5H48.5c-2.762,0 -5,2.239 -5,5S45.738,253.549 48.5,253.549z"/>
<path android:fillColor="#FF000000" android:pathData="M231.5,304.549h-94.499c-2.762,0 -5,2.239 -5,5s2.238,5 5,5H231.5c2.762,0 5,-2.239 5,-5S234.262,304.549 231.5,304.549z"/>
<path android:fillColor="#FF000000" android:pathData="M48.5,314.549h72.801c2.762,0 5,-2.239 5,-5s-2.238,-5 -5,-5H48.5c-2.762,0 -5,2.239 -5,5S45.738,314.549 48.5,314.549z"/>
<path android:fillColor="#FF000000" android:pathData="M231.5,335.049H178c-2.762,0 -5,2.239 -5,5s2.238,5 5,5h53.5c2.762,0 5,-2.239 5,-5S234.262,335.049 231.5,335.049z"/>
<path android:fillColor="#FF000000" android:pathData="M163.101,335.049h-89.5c-2.762,0 -5,2.239 -5,5s2.238,5 5,5h89.5c2.762,0 5,-2.239 5,-5S165.862,335.049 163.101,335.049z"/>
<path android:fillColor="#FF000000" android:pathData="M58.501,335.049H48.5c-2.762,0 -5,2.239 -5,5s2.238,5 5,5h10.001c2.762,0 5,-2.239 5,-5S61.263,335.049 58.501,335.049z"/>
<path android:fillColor="#FF000000" android:pathData="M231.5,274.049h-30.499c-2.762,0 -5,2.239 -5,5s2.238,5 5,5H231.5c2.762,0 5,-2.239 5,-5S234.262,274.049 231.5,274.049z"/>
<path android:fillColor="#FF000000" android:pathData="M48.5,284.049h135c2.762,0 5,-2.239 5,-5s-2.238,-5 -5,-5h-135c-2.762,0 -5,2.239 -5,5S45.738,284.049 48.5,284.049z"/>
<path android:fillColor="#FF000000" android:pathData="M251,123.829h-17.5c-2.762,0 -5,2.239 -5,5s2.238,5 5,5H251c2.762,0 5,-2.239 5,-5S253.762,123.829 251,123.829z"/>
<path android:fillColor="#FF000000" android:pathData="M251,164.749h-46c-2.762,0 -5,2.239 -5,5s2.238,5 5,5h46c2.762,0 5,-2.239 5,-5S253.762,164.749 251,164.749z"/>
</vector>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="187.5dp"
android:height="187.5dp"
android:viewportWidth="187.5"
android:viewportHeight="187.5">
<path
android:pathData="M29.758,69.859L155.562,69.859A10,10 0,0 1,165.562 79.859L165.562,118.18A10,10 0,0 1,155.562 128.18L29.758,128.18A10,10 0,0 1,19.758 118.18L19.758,79.859A10,10 0,0 1,29.758 69.859z"
android:strokeLineJoin="round"
android:strokeWidth="3.121243"
android:fillColor="#ffffff"
android:strokeColor="#000000"
android:strokeLineCap="round"/>
<path
android:pathData="M48.997,118.715h87.326v29.464h-87.326z"
android:strokeLineJoin="round"
android:strokeWidth="3.121243"
android:fillColor="#ffffff"
android:strokeColor="#000000"
android:strokeLineCap="round"/>
<path
android:pathData="m34.338,89.741l115.317,0"
android:strokeWidth="4.057616"
android:fillColor="#00000000"
android:fillAlpha="0.75"
android:fillType="evenOdd"
android:strokeColor="#000000"
android:strokeLineCap="round"/>
<path
android:pathData="m59.523,148.062l66.274,0"
android:strokeWidth="2.080829"
android:fillColor="#00000000"
android:fillAlpha="0.75"
android:fillType="evenOdd"
android:strokeColor="#000000"/>
<path
android:pathData="m59.523,141.435l66.274,0"
android:strokeWidth="2.080829"
android:fillColor="#00000000"
android:fillAlpha="0.75"
android:fillType="evenOdd"
android:strokeColor="#000000"/>
<path
android:pathData="m59.523,134.808l66.274,0"
android:strokeWidth="2.080829"
android:fillColor="#00000000"
android:fillAlpha="0.75"
android:fillType="evenOdd"
android:strokeColor="#000000"/>
<path
android:pathData="m59.523,128.18l66.274,0"
android:strokeWidth="2.080829"
android:fillColor="#00000000"
android:fillAlpha="0.75"
android:fillType="evenOdd"
android:strokeColor="#000000"/>
<path
android:pathData="M48.337,41.768h87.326v28.464h-87.326z"
android:strokeLineJoin="round"
android:strokeWidth="3.121243"
android:fillColor="#ffffff"
android:strokeColor="#000000"
android:strokeLineCap="round"/>
<path
android:pathData="m58.863,63.127l66.274,0"
android:strokeWidth="2.080829"
android:fillColor="#00000000"
android:fillAlpha="0.75"
android:fillType="evenOdd"
android:strokeColor="#000000"/>
<path
android:pathData="m58.863,56.5l66.274,0"
android:strokeWidth="2.080829"
android:fillColor="#00000000"
android:fillAlpha="0.75"
android:fillType="evenOdd"
android:strokeColor="#000000"/>
<path
android:pathData="m58.863,49.873l66.274,0"
android:strokeWidth="2.080829"
android:fillColor="#00000000"
android:fillAlpha="0.75"
android:fillType="evenOdd"
android:strokeColor="#000000"/>
</vector>
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android">
android:shape="rectangle">
<solid android:color="#EEB80202" />
<corners android:bottomRightRadius="80dp"
android:bottomLeftRadius="80dp"
android:topRightRadius="80dp"
android:topLeftRadius="80dp"/>
<gradient
android:startColor="#00796B"
android:centerColor="#0F6B75"
android:endColor="#D1D1D1"
android:angle="90" />
</shape>
\ No newline at end of file
......@@ -3,7 +3,7 @@
<gradient
android:angle="135"
android:centerColor="#009688"
android:endColor="#00695C"
android:startColor="#4DB6AC"
android:endColor="#005349"
android:startColor="#8CDFD8"
android:type="linear" />
</shape>
\ No newline at end of file
......@@ -6,33 +6,114 @@
android:layout_height="match_parent"
tools:context=".ImageProcessing.ImageProcess">
<Button
android:id="@+id/capture3"
android:layout_width="100dp"
android:layout_height="50dp"
android:background="@drawable/roundedbutton"
android:insetLeft="14dp"
android:insetRight="5dp"
android:text=""
app:icon="@drawable/ic_resize_double_arrows_svgrepo_com"
app:iconPadding="10dp"
app:iconSize="40dp"
app:iconTint="#FFFFFF"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.926"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.906" />
<Button
android:id="@+id/capture2"
android:layout_width="100dp"
android:layout_height="50dp"
android:background="@drawable/roundedbutton"
android:backgroundTintMode="screen"
android:insetLeft="4dp"
android:insetRight="55dp"
android:text=""
app:icon="@drawable/ic_diagonal_ui_svgrepo_com"
app:iconPadding="20px"
app:iconSize="40dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.088"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.905" />
<TextView
android:id="@+id/text3"
android:layout_width="334dp"
android:layout_height="61dp"
android:text="Hello User !!!!"
android:textColor="#673AB7"
android:textSize="25dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.35"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.077" /><![CDATA[
app:layout_constraintVertical_bias="0.911" />
]]>
<ImageView
android:id="@+id/OriginalImageView"
android:layout_width="193dp"
android:layout_height="173dp"
android:layout_width="286dp"
android:layout_height="165dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.073"
app:layout_constraintHorizontal_bias="0.496"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.224"
app:layout_constraintVertical_bias="0.183"
tools:srcCompat="@tools:sample/avatars" />
<Button
android:id="@+id/capture"
android:layout_width="243dp"
android:layout_height="66dp"
android:text="Scan"
android:layout_width="93dp"
android:layout_height="93dp"
android:background="@drawable/roundedbutton"
android:insetLeft="14dp"
android:insetRight="5dp"
android:text=""
app:icon="@drawable/ic_search_svgrepo_com"
app:iconPadding="10dp"
app:iconSize="50dp"
app:iconTint="#DDDDDD"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.545" />
app:layout_constraintVertical_bias="0.899" />
<ImageView
android:id="@+id/imageviewUpdate"
android:layout_width="169dp"
android:layout_height="166dp"
android:layout_width="65dp"
android:layout_height="95dp"
android:visibility="invisible"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.933"
......@@ -41,14 +122,58 @@
app:layout_constraintVertical_bias="0.233"
tools:srcCompat="@tools:sample/avatars" />
<TextView
android:id="@+id/textfinal"
android:layout_width="287dp"
android:layout_height="71dp"
android:text=""
<androidx.cardview.widget.CardView
android:layout_width="356dp"
android:layout_height="187dp"
android:layout_marginTop="80dp"
android:background="@drawable/side_nav_bar"
app:cardBackgroundColor="@color/design_default_color_secondary_variant"
app:cardCornerRadius="20dp"
app:cardElevation="0dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.49"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.757" />
app:layout_constraintTop_toTopOf="parent">
app:layout_constraintVertical_bias="0.604"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/side_nav_bar"
android:divider="@android:drawable/divider_horizontal_textfield"
android:orientation="vertical">
<TextView
android:id="@+id/text1"
android:layout_width="334dp"
android:layout_height="61dp"
android:layout_marginLeft="7dp"
android:layout_marginTop="10dp"
android:paddingLeft="10px"
android:paddingTop="5pt"
android:text="Extracted Chamical Equation:"
android:textColor="#FFFFFF"
android:textSize="25dp" />
<TextView
android:id="@+id/textfinal"
android:layout_width="337dp"
android:layout_height="88dp"
android:layout_marginLeft="7dp"
android:text=""
android:digits="abcde012345789"
android:textColor="#FFFFFF"
android:textSize="25sp" />
</LinearLayout>
</androidx.cardview.widget.CardView>
</androidx.constraintlayout.widget.ConstraintLayout>
\ No newline at end of file
......@@ -30,9 +30,9 @@
<Button
android:id="@+id/buttonimagepro"
android:layout_width="184dp"
android:layout_height="78dp"
android:text="Button"
android:layout_width="270dp"
android:layout_height="72dp"
android:text="Scan Your Equation"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.497"
......
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
<background android:drawable="@drawable/ic_launcher_background" />
<foreground android:drawable="@drawable/ic_launcher_foreground" />
<background android:drawable="@drawable/ic_launcher_background"/>
<foreground android:drawable="@mipmap/ic_launcher_foreground"/>
</adaptive-icon>
\ No newline at end of file
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