1. How to do screenshot in Linux?

I need to get screenshots of Virtualbox window (with Windows XP inside). Virtualbox is QT application (I do not know, it's important or not). Of course, screenshot of entire screen is enough. By the way, euphoria is useful for image manipulation? I need to search for little images (characters) in the main image. Something like a very primitive OCR.

new topic     » topic index » view message » categorize

2. Re: How to do screenshot in Linux?

There are different methods.

https://wiki.archlinux.org/index.php/Taking_a_Screenshot

new topic     » goto parent     » topic index » view message » categorize

3. Re: How to do screenshot in Linux?

cargoan said...

There are different methods.

OK. I understand, commands in Linux even simpler than DLL in Windows. Althouth I don't understand other thing. How to run external command (for example, xwd) from inside Euphoria-script? How to put result (for example, screenshot in BMP format) to variable (sequence)?

new topic     » goto parent     » topic index » view message » categorize

4. Re: How to do screenshot in Linux?

See system/system_exec builtins and read_bitmap/save_bitmap in std/image.e library.

new topic     » goto parent     » topic index » view message » categorize

5. Re: How to do screenshot in Linux?

cargoan said...

See system/system_exec builtins and read_bitmap/save_bitmap in std/image.e library.

Do I understand correctly that I have to use temporary files? I was hoping that the Euphoria allows me to work in the style of piping. Something similar to this:

sequence MySystemIs = stdout_of(system_exec("uname")) -- MySystemIs = "Linux"
new topic     » goto parent     » topic index » view message » categorize

6. Re: How to do screenshot in Linux?

SocIoDim said...

Do I understand correctly that I have to use temporary files? I was hoping that the Euphoria allows me to work in the style of piping. Something similar to this:

sequence MySystemIs = stdout_of(system_exec("uname")) -- MySystemIs = "Linux"

Euphoria does indeed have Pipe Input/Output. You just have to use pipeio:exec() instead of system_exec().

include std/pipeio.e 
 
function stdout_of( sequence command ) 
 
    sequence data = {} 
 
    object p = pipeio:exec( command, pipeio:create() ) 
    object buff = pipeio:read( p[STDOUT], 256 ) 
 
    while sequence(buff) and length(buff) do 
        data &= buff 
        buff = pipeio:read( p[STDOUT], 256 ) 
    end while 
 
    return data 
end function 
 
sequence MySystemIs = stdout_of( "uname" ) 

-Greg

new topic     » goto parent     » topic index » view message » categorize

7. Re: How to do screenshot in Linux?

This is something incredible! The euphoria even more comfortable than I expected. Thank you.

new topic     » goto parent     » topic index » view message » categorize

8. Re: How to do screenshot in Linux?

A very primitive OCR? I am a little confused by your words. I only konw that there are two basic types of core OCR algorithm, which may produce a ranked list of candidate characters. Matrix matching involves comparing an image to a stored glyph on a pixel-by-pixel basis; it is also known as "pattern matching" or "pattern recognition". This relies on the input glyph being correctly isolated from the rest of the image, and on the stored glyph being in a similar font and at the same scale. This technique works best with typewritten text and does not work well when new fonts are encountered. This is the technique the early physical photocell-based OCR implemented, rather directly. Feature extraction decomposes glyphs into "features" like lines, closed loops, line direction, and line intersections. These are compared with an abstract vector-like representation of a character, which might reduce to one or more glyph prototypes. General techniques of feature detection in computer vision are applicable to this type of OCR, which is commonly seen in "intelligent" handwriting recognition and indeed most modern OCR software. Nearest neighbour classifiers such as the k-nearest neighbors algorithm are used to compare image features with stored glyph features and choose the nearest match. Software such as Cuneiform and Tesseract use a two-pass approach to character recognition. The second pass is known as "adaptive recognition" and uses the letter shapes recognized with high confidence on the first pass to better recognize the remaining letters on the second pass. This is advantageous for unusual fonts or low-quality scans where the font is distorted (e.g. blurred or faded). But you said you want to do screenshot in Linux, I think the simpler way is using an image processing SDK whose way of processing is simple and fast to help you with that project. It can save a lot of time for you. And you'd better try its free trial package first before you make your decision. I hope you success. Good luck.

Best regards,

Arron

new topic     » goto parent     » topic index » view message » categorize

9. Re: How to do screenshot in Linux?

If you know he's running Linux why are you suggesting he use a .Net library?

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu