How do we annotate text from images if we only want that object detector to detect Urdu text in the future? - computer-vision

I have extracted frames from news videos and cleaned them by removing the frames containing text in English and keeping the frames having Urdu text. But there is still a little bit of English text in frames(like channel and program name etc.) that I don't want to be detected by the text detector. How should I annotate these frames:
Should I only annotate Urdu text (so that my text detector doesn't detect English text)
Should I annotate both Urdu and English text (But in this way of annotation text detector will also detect English)
Which way will be suitable for annotating frames to detect only Urdu text in future?
Sample Frame

Related

How to insert image wrapped by text in Xaringan slides

I know in latex the code for inserting image wrapped by text is something like:
\begin{wrapfigure}{r}{0.4\textwidth}
\centering
\includegraphics[width=0.35\textwidth]{img1.jpg}
\caption{This is a figure positioned at the right and wrapped with text.}
\label{fig:img1}
\end{wrapfigure}
I wonder if xaringan slide also has the same tools and if any how to do it.

how to put text at random position in xaringan

I'm trying to put some text in the slides at certain position on top of other stuffs/plots, is that possible? Here is one scenario, the slide is occupied by pictures and texts, but I like to give one sentence conclusion by a different color on top of them, the text just like a stamp to the slide, it's better if I also can adjust the text orientation, just like in powerpoint or keynote, you can add text at any position and style.

How to save text buffer (it contains text modified with different font color, family, style and size) to file using Python and gtk?

I am working on a small application on Linux using gtk and python. A part of the application contains a notepad and text in the notepad can be modified with font styles, font sizes, and colors. I would like to save the contents of the text view to a file with all the modifications and access the modified data when needed. I could save the text into a text file but I need to save its attributes. The next time if we access the file and view it on the text buffer, the text buffer should contain text as well as the modifications(font style, color, size, family).
Hoping for a positive response. Thank you.

wxpython :How I can get the word position in wxrichtextctrl when the window is resized?

My program reads docx file using python-docs tools then display the text on wxrichtextctrl. I stored the screen position of each word ,when it is written on the richttextbox. The problem is when the window is re-sized by the user the words positions are changed how I can catch this change. Because I want to highlight and draw dashed underline for specific words.
Any idea.
Thanks in advance.

DirectWrite: Use Different Font for Latin and Complex Script

I use CreateTextLayout and CreateTextFormat to draw text with DirectWrite (C++), the text is mixed Hebrew/English, is there a way to use a different font/font size for the Latin and Hebrew characters?
Thanks.
When you create the IDWriteTextFormat using CreateTextFormat, you can pass the name of the font family in the first parameter and you can change the size of the font in sixth parameter.
You can get the CreateTextFormat parameters from MSDN.
Here is a list of Microsoft Windows font families, you will find ones in Latin and Hebrew there.
I ended up calling IDWriteFont::HasCharacter to build text ranges inside which all characters use the same font (the hebrew or the latin one).
If that text range uses the hebrew font, I call textLayout->SetFontSize on it to increase the font size.
This amounts to anticipating the font callback DirectWrite will do, which is automatic and cannot be customized.