bugGNU Octave - Bugs: bug #56958, [Octave-Forge] (image)...

 
 

bug #56958: [Octave-Forge] (image) Implementation of insertText

Submitted by:  Guillaume <gyom>
Submitted on:  Fri 27 Sep 2019 04:18:11 PM UTC  
 
Category:  Octave Forge Package Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Feature Request
Status:  Confirmed Assigned to:  None
Originator Name:  Guillaume Open/Closed:  Open
Release:  dev Operating System:  Any

Add a New Comment (Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Mon 07 Oct 2019 11:53:35 AM UTC, comment #5: 

I guess the function would go into the non-existing computer vision package. As discussed before, it's fine to use the image processing package until there's enough of these to create a package of its own.

Rik wrote on comment #2:

> On the other hand, servers built without any graphic capabilities are usually just for doing computes as quickly as possible.  Interacting with images typically requires a bit of human interaction.  You might mant to insert text, and then display the resulting image to see whether the results are pleasing.  So a machine that one would use to do image processing probably has graphic capabilities built in.


It's not uncommon for those computers to annotate the results with some text. It doesn't need to be pretty, you may just want to write a count, confidence, or threshold value in the corner or the figure, so no need for human interaction.

Still, insertText is about annotating a figure, so it's reasonable to expect that octave will be built if plotting enabled.

Carnë Draug <carandraug>
Project Member
Sun 06 Oct 2019 06:59:05 PM UTC, comment #4: 

adding people to cc

Avinoam Kalma <avinoam>
Project Member
Mon 30 Sep 2019 02:49:41 PM UTC, comment #3: 

It will work on all platforms because plotting is supported on all platforms, but if you have configured Octave not to have any sort of plotting (No Qt, FLTK, gnuplot) then it would fail.

On the other hand, servers built without any graphic capabilities are usually just for doing computes as quickly as possible.  Interacting with images typically requires a bit of human interaction.  You might mant to insert text, and then display the resulting image to see whether the results are pleasing.  So a machine that one would use to do image processing probably has graphic capabilities built in.

It doesn't strike me as a problem to require users who want to use this particular function to have a fully functional version of Octave.

Rik <rik5>
Project Administrator
Mon 30 Sep 2019 09:14:07 AM UTC, comment #2: 

Thanks for the feedback. What I was wondering was whether your suggestion would always work on all platforms and even without any graphics backend (for invisible figure and print)?

Guillaume <gyom>
Fri 27 Sep 2019 05:25:31 PM UTC, comment #1: 

Changing the category to Octave Forge Package since any implementation would take place in a package, rather than in octave-core.

The function can easily be simulated by creating a figure, puting the image in it, putting the text in it, and then pulling the pixels back out with print.  A rough draft is shown below.

function RGB = insertText (img, pos, txt)
  hf = figure ("visible", "off");  # Invisible figure for combining images
  imshow (I);                      # Add image
  text (pos(:,1), pos(:,2), txt);  # Add text
  RGB = print (hf, "-RGBImage");   # Extract new image
  close (hf);                      # cleanup temporary figure
endfunction

This works for me with a simple invocation like

hf = figure;
sombrero
img1 = print ("-RGBImage");
clf;
imshow (img1);
img2 = insertText (img1, [200, 200], "Hello World");
hf2 = figure;
imshow (img2)

Rik <rik5>
Project Administrator
Fri 27 Sep 2019 04:18:11 PM UTC, original submission:  

Matlab seems to have a function in its Computer Vision toolbox to directly insert text in an image (without any display):

https://www.mathworks.com/help/vision/ref/inserttext.html

Would there be a way to implement this by reusing an existing low-level Octave functionality dealing with fonts (in Qt?)?

Guillaume <gyom>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by avinoam
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by gyom (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

     

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2019-10-06 avinoam Summary[Octave-Forge] Implementation of insertText => [Octave-Forge] (image) Implementation of insertText
        Carbon-Copy- => Added carandraug
        Carbon-Copy- => Added hardy
    2019-09-27 rik5 CategoryOctave Function => Octave Forge Package
        StatusNone => Confirmed
        SummaryImplementation of insertText => [Octave-Forge] Implementation of insertText

    Back to the top


    Powered by Savane 3.5