Thursday, March 14, 2024

Local Neural Networks to classify objects, detect text and increase resolution in your images with ImageEn v13.1.0 and IEVision 8.1.0

We have now released ImageEn v13.1.0, the latest update to our image editing and display library for Delphi/C++Builder, and IEVision Advanced Tools Add-on 8.1.0. These updates are free if you purchased or extended in the last 12 months. Download from: http://www.imageen.com/support/download/

Other users can extend their registration at: http://www.imageen.com/order/#Extensions

 

Top Ten Enhancements in ImageEn v13.1.0

 

1. New TIEEditControls component: A pre-built set of controls for image editing and effects




2. Many improvements to Proc Previews dialog (and effects chain) including support for Transparency and Choma Key removal, and shape cropping




3. Optimizations to speed and stability of ImageEn Debugging Visualizers, plus support for visualizing TBitmap




4. Enhancements to PDFium Plug-in, including font embedding, and adding images, text, lines and shapes to PDF pages

5. ImageEnView allows Rounded and Polygonal selections of any ImageEn shape, e.g. explosions, dinosaurs, stars, etc.




6. TImageEnProc.Crop supports shape cropping

7. Auto-curving property for TIEShapeLayer and TIEPolylineLayer




8. ImageEn can now save legacy layer files (supported by older versions of ImageEn)

9. Enhancements to ImageMagick support: including unicode filenames, multi-frame support and GIF optimization

10. Warp Brush adds alpha channel support



Full Change History: https://www.imageen.com/info/HistoryFull.html


Top Five Enhancements in IEVision 8.1.0

 

IEVision is our advanced features add-on for ImageEn. V8.1.0 implements local neural net processing, and more:

1. Support for local neural networks to classify objects, detect text and increase resolution




2. Searchable PDF documents can now be created without images

3. New HAAR classifiers: Eye pair, Nose, Mouth, Stop Sign

4. New method to check successful language loading for OCR

5. Improved exception messages for OCR

Full Change History: https://www.imageen.com/ievision/History.html


Nigel
Xequte Software
www.imageen.com

Wednesday, November 15, 2023

Debugging Visualizers, PDF Object Editing, Improved Stitching and OCR, and much more in ImageEn 13.0.0

 We have now released ImageEn, v13.0.0, the latest update to our image editing and display library for Delphi/BCB, and IEVision Advanced Tools Add-on 8.0.0. These updates are free if you purchased a license or extension after 15 November 2022:

http://www.imageen.com/support/download/

Other users can extend their registration for 12 months at:

http://www.imageen.com/order/index.html#Extensions


Top Ten Enhancements in ImageEn v13.0.0


1. ImageEn now includes visualizers that allow you to preview bitmaps, multi-bitmaps, layers, colors and control properties while debugging




2. Fifteen helper methods that with single call allow you to perform advanced tasks with IEVision: Extract text with OCR, find content, detect faces, people and other objects, deskew images, remove backgrounds, stitch photos and documents and create searchable PDF files




3. Many improvements to PDF support to make it the most complete PDFium implementation for Delphi. With v13, objects in PDF pages (images, text or paths) can be parsed, edited and removed. PDF support is now available from Delphi 7




4. PDF pages can be imported as layers, so all objects become editable image, text or polyline layers

5. Enhanced TIERichEdit with new features to save the selected image, insert links, get/set the RTF formatting of a selection and new actions




6. Many new layer features including MoveTo and Closing breaks for TIEPolylineLayer to create more complex shapes, performance optimizations and memory handling improvements with large images, full rotation of formatted text layers, marking of grouped layers, and new vector shapes: Balloon, Link and "Delphi" Gladiator




7. AutoCrop now supports inner cropping to remove all border from rotated or stitched images




8. SVG and WebP are now automatically supported on Delphi 12 if Skia is enabled

9. Four new demos: Find Objects in Image, Screen Capturing, Custom User Interactions and PDF Object editing, plus thirty functions added to "Every Editing Method" demo




10. Zip plug-in also supports ZipX, 7z and Rar



+ Support for Delphi/BCB 12 Athens

Full Change History: https://www.imageen.com/info/HistoryFull.html


Top Five Enhancements in IEVision 8.0.0


IEVision is our advanced features add-on for ImageEn. V8.0.0 improves OCR, image and photo stitching, and more:

1. OCR now built on Tesseract 5 for greater performance using less system memory, and improved accuracy, particularly with images of low resolution or contrast
2. OCR results can be returned in hOCR, ALTO (XML) and text-seperated value formats
3. Other new OCR features including support for Black and White lists, analysis constructor and confidence values
4. Many enhancements to stitching including new thresholding options and improved performance with documents



5. Other fixes and improvements

Full Change History: https://www.imageen.com/ievision/History.html

 

Xequte Software
www.imageen.com

Wednesday, October 18, 2023

Improvements in the Delphi 12 Yukon Beta

Yesterday I downloaded and installed the Delphi 12 Beta. We're hoping to issue an update for our imaging display and editing library in the days after the Delphi 12 release, so I wanted to be sure there were no issues.

The first change that I noticed was the new "Features" dialog:


Which now puts all installation information on the same screen. (This dialog is also available under Tools > Manage Features, so you can easily add functionality later).

I intended to tell you how long it took to complete the installation, but by the time I got back from morning tea it was all done, so at best I can say it was faster than I recall some earlier Delphi versions taking.

 


The most important feature for me in an IDE is stability, and in this, I have been happy with Delphi 11. It is certainly is one of the the most stable versions I have ever used (I started with Delphi 3). The beta documentation reports resolution of over 700 issues from quality.embarcadero.com, but in D11, I only ever encountered a few quirks around searching ("Search Whole Words" always mysteriously enabling, for example).

So those were the first things I tested and I'm glad to report that all those quirks appear to have been resolved, and search itself has been improved.

Here's the new "Find in Files" dialog:


You'll notice the new mask to exclude named sub-directories, which is nice.


Another new feature that I tried was instant code insight.

So you might start typing "image" and it immediately suggests the form's ImageEnView1 control. Click "." to insert it, then the first few letters of the member that you want... This is much quicker than the old Ctrl+Space.


Most importantly, I wanted to test the compilation and running of our ImageEn library, and only encountered one minor change under 64bit that needed resolving (a one minute fix). Also, I noted that EXE size only increased by an insignificant 0.5%, which is pleasing.


That's all that I have for now. I won't be using it as my main IDE until the MMX Code Explorer is updated, but I am excited for the new release.


This blog post is based on a pre-release version of the RAD Studio software and it has been written with specific permission by Embarcadero. No feature is committed until the product GA release.

Sunday, August 27, 2023

Warping, Zip support and PDF form field support in ImageEn 12.5.0

 We have now released ImageEn, v12.5.0, the latest update to our image editing and display library for Delphi/BCB, and IEVision Advanced Tools Add-on 7.1.0. These updates are free if you purchased a license or extension after 26 August 2022:

http://www.imageen.com/support/download/

Other users can extend their registration for 12 months at:

http://www.imageen.com/order/index.html#Extensions

 
A trial of ImageEn is available at:

http://www.imageen.com/download/


Top Ten Enhancements in ImageEn 12.5.0


1. New Retouch Tool to warp the image by pushing with the cursor



2. New Selection Tool to warp images using a Thin Plate Spline Shape Transformation (Requires IEVision)



3. Loading of images and extraction of files from Zip files, including support for AES encryption, dynamic thumbnails and zip folders



4. Programmatically read and set the form fields of PDF files



5. Line and Polyline layers support pen styles like dashes and dots (including via the Layer Properties dialog)



6. Automatically prompts for password when opening encrypted PDF and ZIP files (or optionally via an event)

7. Other PDF improvements including document navigating by clicking page links, and validation of the alpha channel when saving to create smaller files

8. Various improvements to internal dialogs, including tab navigation using the mouse wheel, and layout and localization enhancements

9. Dune AAI and OpenRaster ORA formats supported by ImageMagick plug-in

10. TImageEnMView/TImageEnIO support AutoSetBitDepth to optimize bit depth and other properties when saving

Full Change History: https://www.imageen.com/info/HistoryFull.html


IEVision 7.1.0


IEVision is our advanced features add-on for ImageEn. V7.1.0 implements Thin Plate Spline shape transformations and other improvements.

Full Change History: https://www.imageen.com/ievision/History.html

Tuesday, March 7, 2023

Enhanced Transitions, Filtering and searching for multiple matches within an Image in ImageEn v12.0.0 and IEVision v7.0.0

We have now released ImageEn, v12.0.0, the latest update to our image editing and display library for Delphi/BCB, and IEVision Advanced Tools Add-on 7.0.0. These updates are free if you purchased a license or extension after 6 March 2022:

http://www.imageen.com/support/download/

Other users can extend their registration for 12 months at:

http://www.imageen.com/order/index.html#Extensions


Top Fifteen Enhancements in ImageEn 12.0.0


1. Many improvements to transition effects, including new zig-zag wipes, custom transitions in TImageEnMView, and a single property to apply transition effect when loading images in TImageEnView



2. Filtering in TImageEnMView by all text fields, file size, image dimensions and dates

3. Enhanced TIEColorPalette with default colors, hue palette, bitmap exporting, and auto selection of closest color



4. Advanced TIECanvas drawing methods for stylized text, shapes, polygons, angles and lines



5. Full VCL theming support for TIEColorCurve, TIEColorPalette, THistogramBox and TImageEnProc.DoPreviews()

6. Improved text editing of TIETextLayers including auto-sizing of editor and support for hard returns

7. TImageEnProc.GetDominantColor() can return a list of most used colors

8. "Large thumbnail style" for TImageEnMView

9. Improved TIEMetaListView with design-time preview and new properties and methods for group headers



10. Many improvements to documentation, including more methods in the ImageEnProc Preview section and more detail in the TImageEnVect to TIELayer Transition Info and Updating and Compatibility sections

11. Updated LibRaw to v0.21.1 to support newer Canon, Nikon, Sony and other camera formats

12. New method to join bitmaps with any overlapping content automatically removed

13. TImageEnProc.CompareWith() supports comparing of image rectangles, and includes a new
coverage parameter to improve performance with large images

14. More built-in vector shapes, such as Flag, Dinosaur and Palm Tree



15. Fifty new methods in Every Editing Method demo, such as: CalcImagePalette, TextOut(), StretchValues, IEVision.inpaint(), etc.


Full Change History: https://www.imageen.com/info/HistoryFull.html


IEVision 7.0.0

IEVision is our advanced features add-on for ImageEn. V7.0.0 implements the latest OpenCV, adds support for multiple image matching and more.



Full Change History: https://www.imageen.com/ievision/History.html

Sunday, December 18, 2022

Playing with AI Delphi code generation

Inspired by Michalis, I have been playing with the Open AI chat bot today:

https://chat.openai.com

 

It's early days, I suppose, but my results were decidedly mixed:

 

Query 1: How can I display thumbnails of images using Delphi?

 

Result:

To display thumbnails of images using Delphi, you can use the TImageEnMView component from the ImageEn library. This component is designed specifically for displaying and managing a collection of images, including the ability to display thumbnails of the images.

Here is an example of Delphi code that demonstrates how to use the TImageEnMView component to display thumbnails of images:

uses ImageEnMView, Graphics; var ImageEnMView: TImageEnMView; Bitmap: TBitmap; i: Integer; begin ImageEnMView := TImageEnMView.Create(self); try // Set the thumbnail size ImageEnMView.ThumbWidth := 128; ImageEnMView.ThumbHeight := 128; // Add the images to the TImageEnMView for i := 0 to ImageCount - 1 do begin Bitmap := TBitmap.Create; try // Load the image from a file or stream Bitmap.LoadFromFile(ImageFilename[i]); // Add the image to the TImageEnMView ImageEnMView.IO.AddGraphic(Bitmap); finally Bitmap.Free; end; end; // Display the TImageEnMView on the form ImageEnMView.Parent := Self; ImageEnMView.Align := alClient; finally ImageEnMView.Free; end; end;

This code creates a new TImageEnMView component and sets the ThumbWidth and ThumbHeight properties to specify the size of the thumbnails. It then loads the images from a file or stream and adds them to the TImageEnMView using the AddGraphic method. Finally, it displays the TImageEnMView on the form by assigning it to the Parent property and setting the Align property to alClient.

You can customize the appearance of the thumbnails by setting various properties of the TImageEnMView component, such as the background color, border style, and spacing between the thumbnails. You can also handle events of the TImageEnMView component, such as OnThumbClick, to perform actions when the user clicks on a thumbnail.

 

Analysis:

So it's not a bad result for an engine. It points the user to a valid component for it  (our TImageEnMView *Blush*), and some of the code is correct, but is certainly won't work. Firstly, if you use a TBitmap you'd be limited to the formats that it supports, and more importantly TImageEnMView does not have an IO property or AddGraphic method.

 The correct code would be:

uses
  IEMView, Graphics;

var
  ImageEnMView: TImageEnMView;
  Bitmap: TBitmap;
  i: Integer;
begin
  ImageEnMView := TImageEnMView.Create(self);
  try
    // Set the thumbnail size
    ImageEnMView.ThumbWidth := 128;
    ImageEnMView.ThumbHeight := 128;

    // Add the images to the TImageEnMView
    for i := 0 to ImageCount - 1 do
      ImageEnMView.AppendImage(ImageFilename[i]);

    // Display the TImageEnMView on the form
    ImageEnMView.Parent := Self;
    ImageEnMView.Align := alClient;
  finally
    ImageEnMView.Free;
  end;
end;

 

 Query 2: How can I display a PSD image with Delphi?

 

 Result

To display a PSD (Photoshop Document) file with Delphi, you can use the TImage component from the VCL (Visual Component Library) or the TImageEnView component from the ImageEn library. Both of these components include support for displaying a wide variety of image formats, including PSD.

Here is an example of Delphi code that demonstrates how to use the TImage component to display a PSD file:

uses Graphics; var Bitmap: TBitmap; FileName: string; begin FileName := 'C:\path\to\image.psd'; Bitmap := TBitmap.Create; try // Load the PSD image from a file Bitmap.LoadFromFile(FileName); // Display the image on the TImage component Image.Picture.Assign(Bitmap); finally Bitmap.Free; end; end;

This code creates a new TBitmap object and uses the LoadFromFile method to load the PSD image from a file. It then assigns the TBitmap object to the Picture property of the TImage component to display the image.

Alternatively, you can use the TImageEnView component from the ImageEn library to display the PSD image. The TImageEnView component provides additional features and capabilities for displaying and manipulating images, such as support for zooming and panning. Here is an example of Delphi code that demonstrates how to use the TImageEnView component to display a PSD file:

uses ImageEnView; var ImageEnView: TImageEnView; FileName: string; begin FileName := 'C:\path\to\image.psd'; ImageEnView := TImageEnView.Create(self); try // Load the PSD image from a file ImageEnView.IO.LoadFromFile(FileName); // Display the image on the TImageEnView component ImageEnView.Parent := Self; ImageEnView.Align := alClient; finally ImageEnView.Free; end; end;

This code creates a new TImageEnView object and uses the LoadFromFile method of the IO property to load the PSD image from a file. It then displays the TImageEnView component on the form by assigning it to the Parent property and setting the Align property to alClient.

  

Analysis:

I don't believe it is possible to load PSD files with TImage, so I guess that part is all wrong. The ImageEn code on the other hand, is spot on (though it would obviously easier just to a TImageEnView component to your form at design time).


Query 3: Suggest a Delphi component that allows user to select an area of the image


Result (Second attempt):

One Delphi component that you can use to allow users to select a region of an image is the TImageEnView component from the ImageEn library.

The TImageEnView component is a single-image view that displays an image and allows users to select a region of the image using various selection modes. You can use it to allow the user to select a region of an image using the mouse or other input device.

Here is an example of how you can use the TImageEnView component to allow users to select a region of an image in Delphi:

uses ImageEn; var ImageEnView: TImageEnView; Selection: TRect; begin ImageEnView := TImageEnView.Create(Self); ImageEnView.Parent := Self; ImageEnView.Align := alClient; ImageEnView.SelectionMode := smRectangle; ImageEnView.ShowSelectionRect := True; // Load an image into the TImageEnView component ImageEnView.IO.LoadFromFile('image.jpg'); // Wait for the user to select a region of the image while ImageEnView.SelectionCount = 0 do begin Application.ProcessMessages; Sleep(10); end; // Get the selected region of the image Selection := ImageEnView.SelectionRect[0]; end;

This code creates a new instance of the TImageEnView component, sets the SelectionMode property to allow the user to select a region of the image using the mouse, and loads an image into the component. It then waits for the user to select a region of the image and retrieves the selected region using the SelectionRect property.

I hope this helps! Let me know if you have any questions.

 

Analysis

So the first result offered a TImageEnMView (our control that displays a grid of images) when really a TImageEnView is needed (displays a single image that supports selection).

So I clicked the "Regenerate Response" button and the second option was for TImageEnView. OK, good, but the code is pretty iffy. There are a few properties that are invalid, and it's almost a console type solution anyway (blocking the code while waiting for a selection).

Working code would be (persisting with the same blocking approach):

uses
  ImageEn;

var
  ImageEnView: TImageEnView;
  Selection: TRect;
begin
  ImageEnView := TImageEnView.Create(Self);
  ImageEnView.Parent := Self;
  ImageEnView.Align := alClient;
  ImageEnView.MouseInteractGeneral := [miSelect];

  // Load an image into the TImageEnView component
  ImageEnView.IO.LoadFromFile('D:\im.jpg');

  // Wait for the user to select a region of the image
  // NOTE: Normally you would just use the OnSelectionChange event,
  // not a forever loop
  while ( ImageEnView.Selected = False ) or IEIsLeftMouseButtonPressed() do
  begin
    Application.ProcessMessages;
    Sleep(10);
  end;

  // Get the selected region of the image
  ShowMessage( IERectangleToStr( ImageEnView.SelectedRect ));
end; 


Thursday, September 29, 2022

Using the Google Vision API to analyze images in Delphi

With ImageEn 11.4.0 you can now use the Google Vision API to recognize objects, text, handwriting, faces, famous landmarks and logos in images.

 

Google Vision API Features

Object localization

Detect objects in an image, and returns their label and bounding box

 

Face detection

Locate faces with bounding polygons, and identifies specific facial "landmarks" such as eyes, ears, nose, mouth, etc. along with their corresponding confidence values.
Also, returns likelihood ratings for emotion (joy, sorrow, anger, surprise) and general image properties (underexposed, blurred, headwear present).




Landmark detection

Detect popular natural and human-made structures within an image, returning the name, GPS coordinates and bounding box for the landmark.


  

  


Logo detection

Recognize popular product logos within an image, returning their name and bounding box.

  


Text detection

Recognize text and handwriting within an image (OCR), returning the text and location.
Returns text in all Google-supported languages.

  

  


Web Entities and Pages

Detect references and related web information for an image, including:
- Best guess label: A best guess as to the topic of the requested image inferred from similar images on the Internet
- Inferred entities (labels/descriptions) from similar images on the Web
- Full matching images: A list of URLs for fully matching images of any size on the Internet
- Partial matching images: A list of URLs for images that share key-point features, such as a cropped version of the original image
- Pages with matching images: A list of Webpages with an image that matches one of the above rules
- Visually similar images: A list of URLs for images that share some features with the original image

  


SafeSearch: Explicit content detection

Detects explicit content such as adult content or violent content within an image.
Provides likelihood ratings for the following explicit content categories: adult, spoof, medical, violence, and racy.

 

For more information on ImageEn, visit:

www.ImageEn.com