How to create the template using tiff file and read the value

Hi sir,

   i try with ur example with txt file that one i get empty value

I want to generate the omr template for tiff file. i use below code to generate the.

Dim openImage As Aspose.Imaging.Image = Aspose.Imaging.Image.Load("D:\QRcode sample\OMR\SKMBT_C22423121111390.tif")
       Dim tiffImage As Aspose.Imaging.FileFormats.Tiff.TiffImage = TryCast(openImage, Aspose.Imaging.FileFormats.Tiff.TiffImage)
       If tiffImage Is Nothing Then Return

        For Each tiffFrame As Aspose.Imaging.FileFormats.Tiff.TiffFrame In tiffImage.Frames
           Dim ms As MemoryStream = New MemoryStream()
           tiffFrame.Save(ms, New Aspose.Imaging.ImageOptions.PngOptions())
           Dim generationResult As Aspose.OMR.Generation.GenerationResult = omrEngine.GenerateTemplate(ms)
            generationResult.Save("", "D:\QRcode sample\OMR\Hello.OMR")
       Next

Dim templatePath As String = "D:\QRcode sample\omr\hello.omr.omr"
        Dim engine As OmrEngine = New OmrEngine()
        Dim templateProcessor As TemplateProcessor = engine.GetTemplateProcessor(templatePath)
        Dim TIFFImagePath As String = "D:\QRcode sample\OMR\SKMBT_C22423121111390.tif"
        Dim result As RecognitionResult = templateProcessor.RecognizeImage("D:\QRcode sample\omr\hello.omr.png", 60)
        Dim exportPath As String = "D:\QRcode sample\OMR\Photo1Results.csv"
        File.WriteAllText(exportPath, result.GetCsv())

i get empty result

the sample file i send pls give some solution.

tiif file.zip (4.8 MB)

@psd.senthilnathan

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): OMRNET-946

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi sir

       We already pruchase the license for 2017. now we check OMR with new dll.

We desicde to purchase new license. So please help to solve the issue while genrating the omr template

i try with ur example with txt file that one i get empty value

I want to generate the omr template for tiff file. i use below code to generate the.

Dim openImage As Aspose.Imaging.Image = Aspose.Imaging.Image.Load("D:\QRcode sample\OMR\SKMBT_C22423121111390.tif")
       Dim tiffImage As Aspose.Imaging.FileFormats.Tiff.TiffImage = TryCast(openImage, Aspose.Imaging.FileFormats.Tiff.TiffImage)
       If tiffImage Is Nothing Then Return

        For Each tiffFrame As Aspose.Imaging.FileFormats.Tiff.TiffFrame In tiffImage.Frames
           Dim ms As MemoryStream = New MemoryStream()
           tiffFrame.Save(ms, New Aspose.Imaging.ImageOptions.PngOptions())
           Dim generationResult As Aspose.OMR.Generation.GenerationResult = omrEngine.GenerateTemplate(ms)
            generationResult.Save("", "D:\QRcode sample\OMR\Hello.OMR")
       Next

Dim templatePath As String = "D:\QRcode sample\omr\hello.omr.omr"
        Dim engine As OmrEngine = New OmrEngine()
        Dim templateProcessor As TemplateProcessor = engine.GetTemplateProcessor(templatePath)
        Dim TIFFImagePath As String = "D:\QRcode sample\OMR\SKMBT_C22423121111390.tif"
        Dim result As RecognitionResult = templateProcessor.RecognizeImage("D:\QRcode sample\omr\hello.omr.png", 60)
        Dim exportPath As String = "D:\QRcode sample\OMR\Photo1Results.csv"
        File.WriteAllText(exportPath, result.GetCsv())

@psd.senthilnathan

Would you please share the sample TIFF that you are using to generated the template. We need to check the feasibility of your requirement. We will log an investigation ticket and share the ID with you.

Hi sir

thanks for ur reply , i send sample tiff file
tiif file.zip (4.8 MB)

@psd.senthilnathan

Looks like you have shared the same TIFF image that you shared before in your previous post. Please note that an investigation ticket has already been logged in our issue tracking system for the sake of analysis. We have been checking it and as soon as ticket is resolved, we will be sharing updates with you in this forum thread. You can check the ticket attached at the bottom of this forum thread. Please spare us some time.

Hello @psd.senthilnathan

  1. In 23.6.1 release we have introduced extended support for multipage files via “Aspose.OMR.Api.TemplateProcessor.Recognize”. Release notes: Aspose.OMR for .NET 23.6.1 - Release Notes

  2. This line:

Dim generationResult As Aspose.OMR.Generation.GenerationResult = omrEngine.GenerateTemplate(ms)

ms variable holds byte array of tiff frame, which is incorrect.

omrEngine.GenerateTemplate accepts .txt.json files for template generation (images and .omr markup file)
memory stream overload is exists to support application without access to file systems (Cloud solutions) and contains same .txt.json but as byte stream.

For more see: Stages of the OMR process|Documentation

  1. Am I understanding correctly - you have an existing template you wish to recognize using Aspose.OMR?