Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added UI features #14

Merged
merged 8 commits into from
Sep 5, 2017
Merged

Added UI features #14

merged 8 commits into from
Sep 5, 2017

Conversation

ujjaldas1997
Copy link
Contributor

I have modified some codes, so that at run time, the program would not crash and written simple UI that run in browser having an additional dependency "flask". Feel free to discuss with me about these.

Imagehandler.py Outdated
@@ -7,6 +7,7 @@
from PatternFinding import PatternFinding
from FindingOrientationOfContours import FindingOrientationOfContours
from AffineTransformation import AffineTransformation
import numpy as np
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we using this module in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In case of debugging, line no - 70 uses numpy. But we are not using numpy.

Imagehandler.py Outdated
@@ -48,36 +49,38 @@ def WritingImage(self, image, path, imageName):
cv.imwrite(path + imageName, image)
cv.imshow(imageName, image)
cv.waitKey(0)
cv.destroyAllWindows()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alignment issue

Copy link
Contributor Author

@ujjaldas1997 ujjaldas1997 Sep 4, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we are not using this(line no 52), then the program crashed after showing the output image.
screenshot from 2017-09-04 17-59-44

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is indentation correct?

Imagehandler.py Outdated
# cv.waitKey(0)
#uncomment this to see the contours on the image
#cv.drawContours(thresholdImage, contours, -1, (255,255,0), 3)
'''#patternFindingObj=PatternFinding()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

''' ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am sorry, I was not aware of that change.

Imagehandler.py Outdated
contour_group = (thresholdImage, contours, hierarchy)
return contour_group

def QRCodeInImage(self):
patternFindingObj = PatternFinding(
self.GetImageContour(), self.imageOriginal)
patterns = patternFindingObj.FindingQRPatterns(3)
if len(patterns):
if len(patterns) == 0:
print 'patterns unble to find'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't understand. Can you elaborate this?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unable

cv.imshow('hello', self.image)
#cv.imshow('best qr contour', self.image) #uncomment to debug
#cv.waitKey(0)
#cv.destroyAllWindows()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't get it.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cv. destroyAllWinddows doesn't seem to be properly indented

QRPatterns.append(patterns[ind])
#cv.destroyAllWindows()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indentation?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think all indentations are correct. Did you encounter any error?

config.yml Outdated
@@ -4,8 +4,8 @@

#@author: Ankit Singh
Main:
Input : 'C:\Users\310247467\Desktop\learn\qr\Input\'
Output: 'C:\Users\310247467\Desktop\learn\qr\Results\'
Input : '/home/ujjaldas223/projects/QRCodeReader/Input/'
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any specific need to change this?

@ujjaldas1997
Copy link
Contributor Author

I am really sorry. I didn't reviewed the code and opened a pull request. Now I have updated them.

@ujjaldas1997
Copy link
Contributor Author

@Griffintaur It seems like you want me to include cv.destroyAllWindows() in the loop where cv.imshow()
relies. I have updated that. But only one cv.destroyAllWindows() is enough to deallocate any associate memory, so calling cv.destroyAllWindows() outside the loop also works fine.

@Griffintaur Griffintaur merged commit bd1c7d8 into Griffintaur:master Sep 5, 2017
@Griffintaur
Copy link
Owner

fixes #14

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants