Noutați

Developer Stories: Aldo Victoria Talks About Uworktify

Aldo Victoria started using Delphi in 2001. His application (Uworktify: A Fun Online Print Service Provider App Is Built In Delphi) was one of the submitted showcase entries over at the Delphi 26th Showcase Challenge. Aldo took some time out of his busy schedule to give us some background about how he acquired Delphi skills and knowledge. Head over to the Uworktify website for further information on Aldo’s showcase entry app. When did you start using RAD Studio Delphi and have long have you been using it? I started using Delphi 5 back in 2001. I used Delphi as the main programming language of a telecom company that I worked for from 2001 to 2007. In 2014, I started to experiment with using Delphi for mobile development. Then, in 2019, I started the development of a mobile bond trading app, that was acquired by the second biggest bank in the Dominican Republic. Unfortunately, the bank uses IONIC as their main development language, so we are migrating the mobile bond trading app to Ionic for this customer. We will continue the development of the mobile app for Delphi and Ionic. In 2020, I funded a startup called Uworktify. Uworktify is a Tech Startup incorporated in Delaware, US. We are developing a mobile app and platform to help people aged 25-50 years and small sized businesses that want additional money and those who have underused assets by sharing the asset with the community through our high tech platform, which takes automatic management of all aspects of asset-sharing such as ordering, payment, delivery, CRM, Insurance tech, and AI to manage asset usage/promotion. What was it like building software before you had RAD Studio Delphi? I used C before Delphi. Development using C was very hard and slow! How did RAD Studio Delphi help you create your showcase application? I was able to develop the app in just a couple of months mostly completely by myself. I really think that I was able to do it this way because Delphi is a great tool. What made RAD Studio Delphi stand out from other options? I am not sure about the answer to this question. I think that they are really good free tools for developing mobile apps out there. For me, the biggest stand out is that I had good programming skills already with Delphi and I was able to re-use them to create a mobile app. What made you happiest about working with RAD Studio/Delphi? The graphical IDE and the language is very friendly. Delphi is updated all the way! I haven’t found anything that I can’t do with Delphi, no matter how complex the task is. What have you been able to achieve through using RAD Studio Delphi to create your showcase application? Developed mobile applications for Android/iOS Integrated the following platforms: AWS Amazon S3 Stripe Twillio SendGrid Use other REST API Application What are some future plans for your showcase application? We plan to move the operation from the Dominican Republic to USA and start looking for funding. In 2021, we plan to have the application available in the USA and in other countries by 2022. On the technical part, we are developing the integration of the application with Hubspot and Uber. Thank you, Aldo! Check out Aldo’s showcase entry below […]

Read More

Detecting Logos On Images Using Google Cloud Vision API

It’s a cliché that Developers are known for their taste to work long hours while drinking coffee… so, if you are into programming you most probably know the logo in the image below as it stands for the American multinational and world’s largest coffeehouse chain, Starbucks! The power of logos The point is that there is no name written in the coffee mug, just a logo. Let’s imagine for a moment that I don’t know which brand the logo represents; wouldn’t it be nice to have a way to find out what the logo stands for and to whom it belongs? Even more than that – wouldn’t it be even better if we would incorporate that ability to recognize the logos in our own Windows, desktop and mobile applications? The good news is that’s exactly what we can do with the Google Cloud Vision API. Google Cloud Vision API Logo Detection API The option for “Logo Detection” is a part of the Google Cloud Vision API that we can use to detect and extract information about multiple logos in an image. For each logo detected Google provides a textual description of the entity identified, a confidence score – how certain the machine learning AI is that the detection is accurate – and a bounding polygon for the logo in the file so we know where it is located within the area of the image. We can easily use machine-learning AI in our Delphi applications Google Cloud’s Vision API offers powerful pre-trained machine learning models that you can easily use on your desktop and mobile applications through REST or RPC API methods calls. Lets say you want your application to detect objects, locations, activities, animal species, products, or maybe you want not only to detect faces but also their emotions, or you may have the need to read printed or handwritten text, this and much more is possible to be done for free (up to first 1000 units/month per feature) or at very affordable prices and scalable to the use you make with no upfront commitments. We can use RAD Studio and Delphi to easily setup its REST client library to take advantage of Google Cloud’s Vision API to empower our desktop and mobile applications and if the request is successful, the server returns a 200 OK HTTP status code and the response in JSON format. Our RAD Studio and Delphi applications will be able to either call the API and perform the detection on a local image file by sending the contents of the image file as a base64 encoded string in the body of the request or rather use an image file located in Google Cloud Storage or on the Web without the need to send the contents of the image file in the body of your request. How do I set up the Google Cloud Vision Logo Detection API? Make sure you refer to Google Cloud Vision API documentation in the Detect Logo section – https://cloud.google.com/vision/docs/detecting-logos – but in general terms this is what you need to do on Google’s side: Visit https://cloud.google.com/vision and login with your Gmail account Create or select a Google Cloud Platform (GCP) project Enable the Vision API for that project Enable the Billing for that project Create a API Key credential How do […]

Read More

MindGlow Is A Powerful Mindful Meditation App

According to the US CDC, the social and interpersonal restrictions which arose during the COVID-19 world pandemic was accompanied by a substantial uptick in stress and anxiety levels. People were apparently finding that the isolation brought about social distancing measures along with a corresponding impact on work and financial insecurity was unsettling and many seem to have found it difficult to deal with. One growth area for developers was in producing apps which helped mitigate those stress levels by encouraging techniques like mindfulness. MindGlow Mindfulness Android mobile app is powered by Delphi For anyone that wishes to resolve emotional issues, enter relaxed states, creative states, and highly functioning learning at the touch of a button, then MindGlow is for you. MindGlow makes use of “binaural beats” sound technology. Binaural beats is the use of specific different synchronized tones to each ear. This kind of use of acoustic waves is believed to be able to promote mindfulness, a calming effect and with that a reduction in stress. What does the MindGlow developer say about their mindfulness app? Written by Canadian developers ProjectOne Solutions based in Ontario, Quebec, the app uses Embarcadero’s RAD Studio Delphi and the cross-platform FireMonkey FMX framework to target Android mobile devices. ProjectOne says: “Some of the benefits of MindGlow are stress relief, relaxation, clarity, new ideas, new insights and emotional resilience. It even increases your HeartRateVariability for better physical health. Overall you’ll become more of your potential.“ They also say “MindGlow includes audio sequences for all the beneficial brain states – Alpha, Theta, Delta and Gamma. It also includes 9 levels of intensity – deepening your meditation for years to come“. ProjectOne also say that you need to be wearing headphones or ear-buds to use the app due to the way different audio needs to be delivered to each ear independtly. Website MindGlow Google Play MindGlow Screenshot Gallery

Read More

Extract, Transform, Load – The Magic Behind HeidiSQL

HeidiSQL is a wildly successful open source database management tool. Apart from being extremely useful in the management of MySQL, SQL Server, PostgreSQL and SQLite databases it is also open source – and that source code is written in Delphi. We’ve taken a brief overview of it before but that time we only scratched the surface of this wonderfully artful example of Delphi programming at its best. The code itself is packed with really great techniques. Let’s take a closer look at it. Things you will need to compile the HeidiSQL code You need RAD Studio Delphi 10.4 or higher.  I used Delphi 10.42. It’s easier if you have some form of Git source code control client installed.  I used my favorite GitHub Desktop client. The HeidiSQL source relies on two custom components – the source for them is included in the HeidiSQL source download. You should also download and install madExcept. Installing madExcept If you haven’t come across madExcept before you’re missing out! It’s a really great tool for intercepting and reporting on program exceptions which occur while your program is running. The website explains in more detail but I thoroughly recommend it. Go to http://www.madshi.net/madExceptDescription.htm Download and run the installer Make sure you check madExcept v5. The installer is a little bit confusing – click on version 5 and it will select it to be installed (the default is not to install version 4 or 5 which has confused me in the past!) When it’s properly installed there will be an extra menu item added to your RAD Studio tools menu Getting the HeidiSQL source code Head on over to the HeidiSQL site and click on the “download source” button. This will take you to the following link: https://github.com/HeidiSQL/HeidiSQL Installing the required third-party components HeidiSQL relies on two additional components. Note that both components are very popular so make sure you don’t already have them installed. If you don’t have them installed follow the instructions below. The required items are: SynEdit to provide a syntax-highlighted query editor area. VirtualTreeView to implement a number of very fast tree and listview style UI views. Installing SynEdit Navigate to the .HeidiSQLcomponentssyneditPackagesDelphi10.4SynEdit.groupproj project and load it. Right click and compile the SynEdit_R project and then right click and select “install” for the SynEdit_D design-time package. Installing VirtualTreeView Navigate to the .HeidiSQLcomponentsvirtualtreeviewpackagesDelphi10.4VirtualTrees.groupproj and load it. Right click and compile the VirtualTreesR runtime package.  Now right-click and select “install” for the VirtualTreesD design-time package. Compiling required resource (.res) files There’s a little bit of a gap in the steps I saw about compiling HeidiSQL from source code. There are a few .rc resource files for things like icons and fonts and there didn’t appear to be anywhere saying that they needed to be compiled. I may have missed them (I did try compiling the various group projects) in which case let me know in the comments and I’ll update this post with the correction – but until then do the following: Navigate to the .HeidiSQL root source folder. In there is a batch file called “build-res.bat” – run that file. It should complete without errors. Now navigate to the .HeidiSQLsourcevcl-styles-utils folder. In there is a file called “CompileResources.bat” Edit that file with a text editor and remove the paths at the start of the […]

Read More

#WEBINARS #WEBINARS #WEBINARS

Ever since we introduced our TMS WEB Academy platform (entirely built using our own TMS WEB Core product by the way) in February this year, it has been popular and much appreciated. Accelerated by the COVID19 pandemic, it is here to stay as a (free) way to learn about software development and directly communicate and interact with our experts during focused webinars.  So, today, we announce 3 new free webinars coming up in June! Introduction to TMS WEB Core for Visual Studio Code June 3, 15h00 UTC You want to use your favorite Object Pascal language. You want to develop web client applications. You want to use an IDE directly on Windows or macOS or a Linux machine. You want to use RAD component based development methodology. Then we have this webinar for you where we introduce TMS WEB Core for Visual Studio Code. No prior knowledge or experience required, we will take you through the steps to create your first web client applications with this hugely popular free IDE and TMS WEB Core. Miletus : Using web technology to create cross-platform desktop applications June 10, 15h00 UTC You have customers who prefer a web application? You have customers who prefer a desktop application? You want to take advantage of web technology to create stunning user interfaces? You want an easy way to use local databases? With Miletus coming with TMS WEB Core, you can do it all. In this webinar, we show you what Miletus is, what you can use it for, how you can use it. Learn in just one hour webinar how to build a database powered, cross-platform desktop app with a good looking web front-end running on Windows, macOS or Linux.    Sign up for the webinar here  What is FNC : Introduction to the growing family of FNC technology based components June 17, 15h00 UTC You heard about this yet another TLA (Three-Letter-Acronym) FNC but are unsure what it stands for and why and how you can benefit from it? In this webinar, we explain the basics of what FNC is, how it is created, what FNC components and products exist meanwhile. Whether you are a Delphi VCL classic Windows application developer, a Delphi FMX cross-platform developer, a developer wanting to create web applications or a developer preferring free IDEs like Lazarus or Visual Studio Code, FNC will empower you in any scenario. Learn all about this in this webinar and never forget anymore what the TLA FNC stands for. Sign up for the webinar here  More webinars? If you have ideas, let us know what you want to see covered in upcoming webinars! We are eager to learn where we can add value with content offered via a webinar. Or, if you created a great application or have an original or creative use case for any of our products and you feel like presenting this to your fellow Delphi developers, don’t hesitate to reach out and you could be next offering a webinar on our TMS Web Academy.Or meanwhile you can have a look at the previous webinars we offered and for which the recorded sessions are available.

Read More

Upscale Images With DeepAI’s Super Resolution API

DeepAI is very popular platform for artificial intelligence. They provide researches, guides, news and several AI APIs. You can learn more about their APIs from this link: https://deepai.org/apis The range and depth of the APIs offered by DeepAI is quite astounding. They include APIs which allow for image colorization, facial recognition, nudity detection, sentiment and emotion detection, text summarization, pose detection, text/caption generation, OCR, text to image, signature verification, toonify (to turn images into cartoon-like drawings), content moderation, anonymization and MANY more – the complete list is pretty staggering! Chances are DeepAI has something to satisfy your needs for addining and using artificial intelligence to your Windows, desktop and mobile apps. We’re going to focus on one API in particular – the Super Resolution API. What is Super Resolution API? In this article, we are going to implement the “Super Resolution API” using Delphi. This API uses machine learning to clean, sharp and upscale photos with out losing the original content. It can correct blurry images to some accepted level. This is not a simple mathematical algorithm to upscale image, but a machine learning which identify the content and make it better without losing original content. So it’s always better than an image processing application in your PC. How to get DeepAI API key? It’s easy to get the API key. You don’t need an Credit card. You will get $5 USD API credits free at registration which equivalent to 10,000 API requests. After that you can pay by $0.50 USD per 1000 requests. You can signup with google account or a regular signup. Then go to Dashboard and you can find the API key. You can use that key for any API. How to send a request to Super Resolution API from Delphi? There are two types of requests depending on, Send image as URL Send image as file Parameters are the same for both requests. api-key: API key as header parameter image: Image to process Code to send the API request using REST components are like this: RESTRequest.Params.Clear; RESTResponse.RootElement := ”; lparam := RESTRequest.Params.AddItem; lparam.name := ‘api-key’; lparam.Value := [YOUR API KEY]; lparam.ContentType := ctNone; lparam.Kind := pkHTTPHEADER; lparam.Options := [poDoNotEncode]; lparam := RESTRequest.Params.AddItem; lparam.name := ‘image’; lparam.Value := [PATH TO IMAGE]; lparam.ContentType := ctNone; lparam.Kind := pkFile; lparam.Options := [poDoNotEncode]; RESTRequest.Execute; 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 RESTRequest.Params.Clear; RESTResponse.RootElement := ”; lparam := RESTRequest.Params.AddItem; lparam.name := ‘api-key’; lparam.Value := [YOUR API KEY]; lparam.ContentType := ctNone; lparam.Kind := pkHTTPHEADER; lparam.Options := [poDoNotEncode];   lparam := RESTRequest.Params.AddItem; lparam.name := ‘image’; lparam.Value := [PATH TO IMAGE]; lparam.ContentType := ctNone; lparam.Kind := pkFile; lparam.Options := [poDoNotEncode];   RESTRequest.Execute; You can send images in most of image file types, but the response always will be a JPG file. How to process the response from the Super Resolution API? If the request is success, you will get a response in JSON like this: { “id”: “XXXXXXXXXXXXXXXXXXXXXXXXXXXX”, “output_url”: “https://api.deepai.org/job-view-file/XXXXXXXXXXXXXXXXXXXXXXXXXXXX/outputs/output.jpg” } { “id”: “XXXXXXXXXXXXXXXXXXXXXXXXXXXX”, “output_url”: “https://api.deepai.org/job-view-file/XXXXXXXXXXXXXXXXXXXXXXXXXXXX/outputs/output.jpg” } ID is the unique id of your processed resource. “output_url” is the URL of your processed image. We can parse this JSON in Delphi like this and get the image as TPicture: jsonObj := RESTResponse.JSONValue as TJSONObject; MS := TMemoryStream.Create; http.Get(jsonObj.Values[‘output_url’].Value, MS); MS.Position := 0; Picture := […]

Read More

Freebie Friday: TMS FNC Maps helper functions

We are back with another freebie friday! TMS FNC Maps comes with a lot of great functionality as well as a (lesser visible) unit bundling helper functions to empower your developments. The unit is called (FMX.)TMSFNCMapsCommonTypes.pas. The prefix FMX., can be replaced with VCL., WEBLib. or LCL depending on the framework. Below are a couple of helper functions explained to help you in write your code more efficiently or add more complex functionality to your application. Plus Codes Plus Codes are like street addresses for people or places that don’t have one. Instead of addresses with street names and numbers, Plus Codes are based on latitude and longitude, and displayed as numbers and letters. With a Plus Code, people can receive deliveries, access emergency and social services, or just help other people find them. source: https://maps.google.com/pluscodes/ TMS FNC Maps supports Plus Codes encoding & decoding with the TTMSFNCMapsPlusCode class. To get started, and convert an existing coordinate to a Plus Code, use the following code: procedure TForm1.EncodeCoordinate; var p: string; begin p := TTMSFNCMapsPlusCode.Encode(CreateCoordinate(40.689188, -74.044562)); //p = ’87G7MXQ4+M5′ end; To decode a Plus Code to a coordinate bounds, which defines the area corresponding to the code, the Decode function can be used: procedure TForm1.DecodePlusCode; var c: TTMSFNCMapsBoundsRec; begin c := TTMSFNCMapsPlusCode.Decode(’87G7MXQ4+M5′);  end;  Measuring distance between 2 coordinates Another great utility function is to measure the distance (in meters) between 2 coordinates. The distance measured is based on the average earth radius (6371000 meters). The sample below demonstrates how to measure the distance between 2 coordinates, but also how to create bounds, create a circle, calculate a new coordinate based on the bearing and many more. procedure TForm1.AddCircle; var   b: TTMSFNCMapsBoundsRec;   d, br: Double;   c: TTMSFNCMapsCoordinateRec;   I: Integer; begin   b := CreateBounds(40.76437, -73.94928, 40.76799, -73.98235);   d := MeasureDistance(b.NorthEast, b.SouthWest);   c := CalculateCoordinate(b.NorthEast, CalculateBearing(b.NorthEast, b.SouthWest), d);   TMSFNCMaps1.BeginUpdate;   with TMSFNCMaps1.AddCircle(b.NorthEast, Round(MeasureDistance(b.NorthEast, b.SouthWest) / 2)) do   begin     FillColor := gcRed;     FillOpacity := 0.5;     StrokeWidth := 10;     StrokeColor := gcPink;   end;   TMSFNCMaps1.EndUpdate; end;

Read More

How to Create a Responsive JavaScript Admin Dashboard Easily with Ext JS

A well-built admin dashboard can significantly increase the productivity of your business. With Sencha Ext JS, you can create responsive admin dashboards easily, allowing your company to discover valuable insights into your data at a glance. The benefits are clear, with a better understanding of your data, you can make more timely and informed business decisions. In this post, you will find all the details you need to get started on your admin dashboard. What is Sencha Ext JS? Sencha Ext JS is a very powerful JavaScript library. It excels in allowing you to quickly create feature-rich web applications. To help you do this, it includes over 140 UI components, including the D3 adapter, grids, and panels. More importantly, Sencha Ext JS supports cross-platform functionality so you can use it to build web apps for any modern device, like desktop PCs, laptops, and smartphones. How to Build a Responsive Admin Dashboard with Sencha Because it supports the MVC architecture, creating admin dashboards is pretty easy with Sencha Ext JS.  Let’s explore the possibilities, starting with this example: To build the dashboard shown above, you have to follow these steps: Create the Model 1. Create a new directory, called the model. Go inside the folder. Then create the email directory. Inside the new folder, create an Email.js file and add these codes: Ext.define(‘Admin.model.email.Email’, { extend: ‘Admin.model.Base’,   fields: [ { type: ‘int’, name: ‘id’ }, { name: ‘read’ }, { type: ‘string’, name: ‘title’ }, { name: ‘user_id’ }, { type: ‘string’, name: ‘contents’ }, { type: ‘string’, name: ‘from’ }, { name: ‘has_attachments’ }, { name: ‘attachments’ }, { name: ‘received_on’, type: ‘date’ }, { name: ‘favorite’ } ] }); Here, you are adding various fields, including id, title, and content. 2. Next, create a Friend.js file and add this code: Ext.define(‘Admin.model.email.Friend’, { extend: ‘Admin.model.Base’,   fields: [ { type: ‘int’, name: ‘id’ }, { type: ‘string’, name: ‘name’ }, { type: ‘string’, name: ‘thumbnail’ }, { type: ‘boolean’, name: ‘online’ } ] }); 3. When you are done, go back to the model folder and create the faq directory. Inside the new folder, create your Category.js file and add the following: Ext.define(‘Admin.model.faq.Category’, { extend: ‘Admin.model.Base’,   fields: [ { type: ‘string’, name: ‘name’ } ],   hasMany: { name: ‘questions’, model: ‘faq.Question’ } }); 4. Create Question.js file and add these codes: Ext.define(‘Admin.model.faq.Question’, { extend: ‘Admin.model.Base’,   fields: [ { type: ‘string’, name: ‘name’ } ] }); 5. After that, go back to the model folder. Then create the search directory. Inside the new folder, create your Attachment.js file and add this code: Ext.define(‘Admin.model.search.Attachment’, { extend: ‘Admin.model.Base’,   fields: [ { type: ‘int’, name: ‘id’ }, { type: ‘string’, name: ‘url’ }, { type: ‘string’, name: ‘title’ } ] }); 6. Ok, now create your Result.js file and add this code: Ext.define(‘Admin.model.search.Result’, { extend: ‘Admin.model.Base’,   fields: [ { type: ‘int’, name: ‘id’ }, { type: ‘string’, name: ‘title’ }, { type: ‘string’, name: ‘thumbnail’ }, { type: ‘string’, name: ‘url’ }, { type: ‘string’, name: ‘content’ } ],   hasMany: { name: ‘attachments’, model: ‘search.Attachment’ } }); 7. We are almost there. Create your User.js file and add these lines: Ext.define(‘Admin.model.search.User’, { extend: ‘Admin.model.Base’,   fields: [ { type: ‘int’, name: ‘identifier’ }, { type: ‘string’, name: ‘fullname’ […]

Read More

6 Ways To Rapidly Collect Massive Datasets in your Apps

What is web scraping? Web Scraping is a technique where a computer program extracts data from human-readable output coming from websites. The web scraping software may directly access the World Wide Web using the Hypertext Transfer Protocol or a web browser. While Web Scraping can be done manually by a software user, the term typically refers to automated processes implemented using a program, bot, or web crawler. It is a form of copying in which specific data is gathered and copied from the web, typically into a central local database, spreadsheet, API, or any format that is more useful for the user, for later retrieval or analysis. First, the app needs to interpret a web page as data Web pages are built using text-based mark-up languages; like HTML and XHTML, and frequently contain rich and useful data in text form. Quite obviously, most web pages are designed for human end-users and not really for ease of automated use. As a result, this can make it a challenging task to build specialized tools and software to facilitate the scraping of any web pages. Delphi plus Python is a powerful combination for web scraping In this tutorial, we’ll build Windows Apps with extensive Web Scraping capabilities by integrating Python’s Web Scraping libraries with Embarcadero’s Delphi, using Python4Delphi (P4D). P4D empowers Python users with Delphi’s award-winning VCL functionalities for Windows which enables us to build native Windows apps 5x faster. This integration enables us to create a modern GUI with Windows 10 looks and responsive controls for our Python Web Scraping applications. Python4Delphi also comes with an extensive range of demos, use cases, and tutorials. We’re going to cover the following… How to use Requests, BeautifulSoup, Instaloader, Snscrape, Tweepy, and Feedparser Python libraries to perform Web Scraping tasks All of them would be integrated with Python4Delphi to create Windows Apps with Web Scraping capabilities. Prerequisites Before we begin to work, download and install the latest Python for your platform. Follow the Python4Delphi installation instructions mentioned here. Alternatively, you can check out the easy instructions found in the Getting Started With Python4Delphi video by Jim McKeeth. Time to get started! First, open and run our Python GUI using project Demo1 from Python4Delphi with RAD Studio. Then insert the script into the lower Memo, click the Execute button, and get the result in the upper Memo. You can find the Demo1 source on GitHub. The behind the scene details of how Delphi manages to run your Python code in this amazing Python GUI can be found at this link. Open Demo01.dproj. How do I Scrape Website’s Data using Python Requests? “Requests” is a simple, yet elegant HTTP library. Requests allow you to execute standard HTTP requests extremely easily. Using this library, you can pass parameters to requests, add headers, receive and process responses, execute authenticated requests. Requests are ready for the demands of building robust and reliable HTTP–speaking applications, for the needs of today. Keep-Alive & Connection Pooling International Domains and URLs Sessions with Cookie Persistence Browser-style TLS/SSL Verification Basic & Digest Authentication Familiar dict–like Cookies Automatic Content Decompression and Decoding Multi-part File Uploads SOCKS Proxy Support Connection Timeouts Streaming Downloads Automatic honoring of .netrc Chunked HTTP Requests After installing Python4Delphi properly, you can get Requests using pip or easy install to your command prompt: […]

Read More

Detecting Objects on images using Google Cloud Vision API

Lets take a look at this image below. Let’s try to think about 2 or 3 objects we can see and focus on what calls our attention the most. If we write them down , lets see if Google can guess it right. Google’s cloud-based vision API – making sense of what we see and much more Google Cloud’s Vision API offers powerful pre-trained machine learning models that you can easily use on your desktop and mobile applications through REST or RPC API methods calls. Lets say you want your application to detect objects, locations, activities, animal species, and products. Or maybe you want not only to detect faces but also their emotion expressed on the faces. Or perhaps you have the need to read printed or handwritten text. All of this and much more is possible to be done for free (up to first 1000 units/month per feature) or at very affordable prices and it’s scalable too with no upfront commitments. Object localization The option for “Object Localization” is part of the Vision API that we can use to detect and extract information about multiple objects in an image. For each object detected the following elements are returned: A textual description – what is it, in plain human language? A confidence score – how certain is the API of what it has detected? And normalized vertices [0,1] for the bounding polygon around the object. Where are the objects on the image? Using RAD Studio Delphi to control the Google Cloud Vision API We can use RAD Studio and Delphi to easily setup its REST client library to take advantage of Google Cloud’s Vision API to empower our desktop and mobile applications and if the request is successful, the server returns a 200 OK HTTP status code and the response in JSON format. Our RAD Studio and Delphi applications will be able to either call the API and perform the detection on a local image file by sending the contents of the image file as a base64 encoded string in the body of the request or rather use an image file located in Google Cloud Storage or on the Web without the need to send the contents of the image file in the body of your request. How do I set up the Google Cloud Vision Object Localization API? Make sure you refer to Google Cloud Vision API documentation in the Object Localization section (https://cloud.google.com/vision/docs/object-localizer), but in general terms this is what you need to do on Google’s side: Visit https://cloud.google.com/vision and login with your Gmail account Create or select a Google Cloud Platform (GCP) project Enable the Vision API for that project Enable the Billing for that project Create a API Key credential How do I call Google Vision API Object Localization endpoint? Now all we need to do is to call the API URL via a HTTP POST method passing the request JSON body with type OBJECT_LOCALIZATION and source as the link to the image we want to analyze. One can do that using REST Client libraries available on several programming languages and a quick start guide is available on Google’s documentation (https://cloud.google.com/vision/docs/quickstart-client-libraries). Actually, at the bottom page of the Google Cloud Vision documentation Guide (https://cloud.google.com/vision/docs/object-localizer) there is an option “Try This API” which allows you to post […]

Read More