Open
Conversation
Merge photo_testing and common demo to solve UI problems
…() will return a report which includes the evaluation of any alteration of a test. Plus improved specs and jUnit tests
…to_testing_alterationImplementation # Conflicts: # app/src/main/java/unipd/se18/ocrcamera/AdapterTestElement.java
* added test photo alteration compatibility - PhotoTester.testAndReport() will return a report which includes the evaluation of any alteration of a test. Plus improved specs and jUnit tests * added get alteration tag method in TestElement * First commit * First commit * details * Forced portrait mode to TestAlterationsActivity * better exception handling, improved specs * fixed null pointer exception in method run() * Merge with AdapterAlterationsTest * removed try - catch block * removed try - catch block * OnClickListener * Removed button in adapterTestAlterations * Log * fixed setting bitmap alteration * Optimized PhotoTester constructor * Removed hardcoded strings * Updated javadoc and simplified code
…amera into photo_testing
…tructuring # Conflicts: # README.md # app/build.gradle # app/src/main/java/unipd/se18/ocrcamera/TextExtractor.java
# Conflicts: # app/src/main/java/unipd/se18/ocrcamera/PhotoTester.java # app/src/main/java/unipd/se18/ocrcamera/ResultActivity.java # app/src/main/java/unipd/se18/ocrcamera/TestListener.java # app/src/main/res/values/strings.xml
Add ManualTestOnSinglePhoto class Add a case in menu in result activity
-delete worker and InformationEntry class -delete countDownLatch -slim the code
-add input layout -now test works on given value
Finished class and wrote last comments Add test on class
Correction of hardcoding String in strings.xml Comments
Giofasan
reviewed
Jan 14, 2019
| * @param length int of length of starting string | ||
| * @return warnings | ||
| */ | ||
| private String findWarning(java.lang.String text, int length) { |
Contributor
There was a problem hiding this comment.
Why do you use java.lang.String when it is enough to write String?
| warnings = getResources().getString(R.string.lessThen30CharWarning); | ||
| } | ||
|
|
||
| return warnings; |
Contributor
There was a problem hiding this comment.
Is it useful to return an empty string when you do not enter in any of the cases proposed by you?
| { | ||
| Matrix matrix = new Matrix(); | ||
| matrix.postRotate(angle); | ||
| return Bitmap.createBitmap(source, 0, 0, source.getWidth(), source.getHeight(), |
Contributor
There was a problem hiding this comment.
It would be useful to add the structure of the createBitmap function to understand what 0 and true are for
| * @param string1 string to split and search in string2 | ||
| * @param string2 string where to search | ||
| * @return percentage of similarity | ||
| * see the link for more information {@link <a https://github.com/tdebatty/java-string-similarity/ |
Contributor
There was a problem hiding this comment.
Excellent idea to add the link
|
|
||
| public class ManualTestOnSinglePhoto extends AppCompatActivity { | ||
|
|
||
| private String startingOCRText; |
Contributor
There was a problem hiding this comment.
Add a comment to explain the variable would help to understand better.
| final int secondBound=20; | ||
| final int thirdBound=30; | ||
| final int toleranceValue=4; | ||
|
|
Contributor
There was a problem hiding this comment.
How did you choose the bounds and tolerance?
final correction
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi Giovanni Fasan,
i ask you to review my code please.
The code is the file ManualTestOnSinglePhoto.
This class receive an angle by user. Then rotate the last image taken by this angle and use OCR on it. Then compare the text from normal and rotated photo and gave back similarity between text.
If you have some suggestion please tell me.
Thanks you.