使用OpenCV 360°全景

时间:2015-09-21 14:01:27

标签: c++ opencv

我正在尝试使用OpenCV创建360°全景。 我尝试了这个代码示例,它的工作非常好:https://github.com/Itseez/opencv/blob/master/samples/cpp/stitching.cpp

class customAdapter extends ArrayAdapter<String> {
    List<String> stringList;
    Context context;

    public customAdapter(Context context, int resource, List<String> objects) {
        super(context, resource, objects);

        stringList = objects;
        this.context = context;
    }

    @Override
    public View getView(int position, View convertView, ViewGroup parent) {

        LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(LAYOUT_INFLATER_SERVICE);
        View rootView = layoutInflater.inflate(R.layout.spinner_item, parent, false);
        TextView textView = (TextView) rootView.findViewById(R.id.textView);

        textView.setVisibility(View.GONE);

        return rootView;
    }


    @Override
    public View getDropDownView(int position, View convertView, ViewGroup parent) {
        LayoutInflater layoutInflater = (LayoutInflater) context.getSystemService(LAYOUT_INFLATER_SERVICE);
        View rootView = layoutInflater.inflate(R.layout.spinner_item, parent, false);

        TextView textView = (TextView) rootView.findViewById(R.id.textView);
        ImageView imageView = (ImageView) rootView.findViewById(R.id.imageView);

        textView.setText(stringList.get(position));
        imageView.setVisibility(View.GONE);

        return rootView;
    }

如果我将这张照片放入360°观看者中,我注意到开头不适合结束。 它看起来像这样:

enter image description here

有没有一种简单的方法可以解决这个问题?

0 个答案:

没有答案