Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8164859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:24:33+00:00 2026-06-06T19:24:33+00:00

My matlab code does image processing, and I made matlab function which has 2

  • 0

My matlab code does image processing, and I made matlab function which has 2 images as inputs. I wrote a separate java class to perform the imread function of matlab, i.e., to read the jpg images into 3D array (its an RGB image).

import java.io.File;
import java.io.IOException;
import javax.imageio.ImageIO;
import QRcode_java.*;
import com.mathworks.toolbox.javabuilder.*;


public class Driver {
    public static void main(String[] args) {
        // TODO Auto-generated method stub
        encoder_class x=null;     //encoder_class is the class built from the  
                                        //matlab function                         

        Object[] barcode2=null;         //output of matlab function
        barcode_image_class barcode;     //class to imread the jpg image input
        barcode= new barcode_image_class();
        original_photo_class original_photo;  
             //class to imread another image input
        original_photo= new original_photo_class();

        try {
            x= new encoder_class();
            barcode2=x.encoder_function(barcode, original_photo); 
//**ERROR!** /*encoder_function is the matlab function written by me. this line gives an //error as the following: 
//"The method encoder_function(List, List) in the type encoder_class 
//is not applicable for the arguments (barcode_image_class, original_photo_class)"*/

        } catch (MWException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
    }

}

Could you please tell me how to fix this error? Is it a problem with my java code, or the import of the matlab code? I am very new to Java, so I can’t figure out the problem. Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:24:34+00:00Added an answer on June 6, 2026 at 7:24 pm

    From you comments, your have defined a method encoder_function(List, List) that takes two Lists as arguments. You are trying to call it with some parameters that are not Lists and that’s why the compiler is complaining.

    To fix this, you have to either:

    • Change encoder_function(List, List) definition to take barcode_image_class, original_photo_class as arguments and update the method’s code accordingly

    OR

    • Find a way to convert barcode_image_class, original_photo_class to List (either by implementing the List interface or by providing some helper method in both classes that convert them into Lists
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on a piece of code in MATLAB using the Image Processing Toolbox,
The following MATLAB code does not work. I guess it has something to do
I do scientific image processing in MATLAB, which requires solving weird optimization problems with
Does anyone know how to make the following Matlab code approximate the exponential function
I have a piece of matlab code below which reads data from a table.
I'm trying to port a Matlab code to Java and C++. It's quite straightforward
suppose that there is given following matlab code function dp = derp(p) n =
I'm doing sampling from log-normal distribution in Java using Matlab code (with javabuilder java).
I trying to convert an old exercise i made in matlab to OpenCV. Code
My idea is building a logo image (similar to Matlab's startup one) which shows

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.