Welcome!
This is the community forum for my apps Pythonista and Editorial.
For individual support questions, you can also send an email. If you have a very short question or just want to say hello โ I'm @olemoritz on Twitter.
Text detection with Vison coreML
-
Sorry, as I work on iPad, I always forget that sheet does not exist on iPhone, this should be ok
mv = ui.View() im = ui.ImageView() pil_image = asset.get_image() print(pil_image.size) ui_image = asset.get_ui_image() wim,him = ui_image.size ws,hs = ui.get_screen_size() if (ws/hs) > (wim/him): h = ws*him/wim im.frame = (0,(hs-h)/2,ws,h) else: w = hs*wim/him im.frame = ((ws-w)/2,0,w,hs) mv.add_subview(im) wi = im.width hi = im.height im.image = ui_image im.content_mode = 1 #1 mv.present()
-
@pavlinb Tried?
-
-
Hi, it's like that:
-
@pavlinb for me, with 'full_screen'
-
Did you try on more natural images?
-
@pavlinb no, sincerely, I don't know anything about mlmodel. When I had read your topic, I only remembered an omz script and I have tried to add objectivec code for your request about VNDetectTextRectanglesRequest. That's all folks ๐
-
Here why it doesnโt work for me:
-
-
@pavlinb As I don't have this iPhone, could you print wim,him,ws,hs so I could simulate, thanks
-
@pavlinb could you also post the analyzed image in Imgur?
-
@cvp wim = 141, him = 64 , ws = 375, hs = 667
-
@pavlinb did you not turn your iPhone during test?
I simulate your dimensions and I get this.
I agree that blue rectangles are not very good but that's so, I think with this code
-
@cvp I'll play with dimensions.
-
@cvp In landscape view image looks better, but in portrait view is sketched and goes outside of the screen.
-
@pavlinb It is strange because I simulated your iPhone in portrait mode
-
I think I did an error, try < instead of >, and sorry ๐
if (ws/hs) < (wim/him):
-
-
it seems that VNRecognizeTextRequest exist in iOS 13.0+ Beta, regarding link.
If I upgrade to iOS 13 Beta should I be able to call it from Pythonista?
-
@pavlinb No idea, sorry. I think that yes, you could.