0

enter image description hereenter image description hereI am new to Android and need to implement one functionality. I have an image url and I need to display it in Image View with four coordinates connected on top of it. When user move the coordinate only one coordinate should move. It should not be like Crop image functionality where two or three coordinates move in order to maintain it as rectangle.

While moving the coordinate, the connected line between two coordinates should also move.

Please help.

Munish
  • 186
  • 1
  • 2
  • 15
  • 1
    No source code means no efforts means expect no answer at Stackoverflow. Share your source code whatever you have tried – Vikasdeep Singh Jun 18 '18 at 04:16
  • 1
    Do a bit of research to get an MCVE going. For instance: http://joerg-richter.fuyosoft.com/?p=120 -Kf – K F Jun 18 '18 at 04:17
  • Hi VicJordan, I am new to Android. I need some direction what should I use for this. I tried using Android Canvas but drawing four coordinates on top of it, I dont know what to use for this. Thats why I have asked this questoin here. Regards, Munish – Munish Jun 18 '18 at 04:18
  • @kfrajer: Thank you. let me have a look. – Munish Jun 18 '18 at 04:21
  • @Munish for instance to me, from your description, it's not clear what are you trying to accomplish. As you're talking UI, make a screenshot or a rough wireframe of what you would like to have. Also, you should show what you accomplished so far, and where your actual problem is, if you want people to be able to help you. – Alessio Jun 18 '18 at 04:36
  • Hi Alessio, Sorry for less description. Let me give a brief of it. I have image which is not proper and it needs some correction. It is taken from different angle and I need to deskew that image and will send that image for further process.In order to deskew it, I need to give proper coordinates to library which user will select by moving the coordnate in proper direction. After moving the dots at rights edges, the user will say okay. I will read those coordinates and will process the proper image correction means deskew. I hope I am clear now. First: – Munish Jun 18 '18 at 04:57
  • I am trying to add screen shot but not able to find option to attach the image here. – Munish Jun 18 '18 at 05:02
  • https://meta.stackexchange.com/questions/75491/how-to-upload-an-image-to-a-post – Alessio Jun 18 '18 at 05:08
  • 1
    HI Alessia, I have pasted two screen shots. The desired result is the once having Red circle. if you see, after touching, only one coordinate is moving. Any idea how can I achieve it. – Munish Jun 18 '18 at 05:11
  • and you would want also the image to shrink while the coordinate moves? Like real time morphing? Not the simplest task to implement – Alessio Jun 18 '18 at 05:12
  • Coordinates are the easy part, you have iv.getLeft() and iv.getTop() and similar methods, and then you have also iv.getLocationOnScreen(aLoc), but the morphing of the image directly could be as interesting as tricky. To some extend most likely possible with basic (and for basic) animations, like rotation and so forth. Unless you find a library for it. – Alessio Jun 18 '18 at 05:14
  • No, i dont want anything to the image. I just needs rectangle wth four coordinates on top of my image and when user moves the dots, that particular should move with lines. As I just needs the coordinates position when user is done with the moving of coordinates. – Munish Jun 18 '18 at 05:15
  • Could you please guide me how shall I draw rectangle with four coordinates on the top of image ? I am facing main problem here. I am able to draw a rectangle but the one I need is with four coordinates which user can move. – Munish Jun 18 '18 at 05:36
  • Take a look of this https://stackoverflow.com/questions/18439246/android-free-croping-of-image – Kprabhu Got Jun 18 '18 at 06:03
  • @KprabhuGot: You rocked man. Thanks for helping me out. The link you have shared were amazing. It solved my problem. The links are not appearing here as its on chat. So any person, who needs help on same kind of problem, here are the link shared to me: http://devcodemarket.com/android-app-source-code-android-scan-library https://github.com/jhansireddy/AndroidScannerDemo https://github.com/mukyasa/MMCamScanner (For IOS) Thanks. – Munish Jun 19 '18 at 00:35

0 Answers0