ErrorCaptureStackSrace , how can I solve this? - stack

[enter image description here][1]
error capture stack strace
[1]: https://i.stack.imgur.com/f1icH.png

Related

Using segmantic image segmentation

I tried using the following example for an image I have. You can find the link here. To reproduce the results I am getting consider the following image
When I apply the following code
import pixellib
from pixellib.semantic import semantic_segmentation
segment_image = semantic_segmentation()
segment_image.load_pascalvoc_model("deeplabv3_xception_tf_dim_ordering_tf_kernels.h5")
segment_image.segmentAsPascalvoc("125.jpg", output_image_name = "output.jpg")
I just get a black image. What I want is to segment the packages in the belt.

How to insert image in odoo 12 docker qweb report

I would like to insert an image from mymodule folder but the image doesn't display. I'm using docker for this odoo.
This is my code:
<img src="/my_module/static/img/img.png" width="100%" height="100%"/>
The result is here below:
I found a similar case: https://github.com/odoo/odoo/issues/32674 but in my case, this solution is not working
Could anyone help me, please?
I solved it. Just change value on key in system parameter web.base.url to http://127.0.0.1:8069. I think this only work with docker installation.

Action Text displaying image error rails 6 on windows 10

I am using windows 10 to program ruby on rails 6 with the help of ruby installer. Everything works fine so far until... I use action text for rich text editor.
I followed this guide [https://edgeguides.rubyonrails.org/action_text_overview.html][1] and everything works. But when I attach an image to the text_area, after saving the image cannot be displayed.
When I open the image's url, I see this:
MiniMagick::Error in ActiveStorage::RepresentationsController#show
`magick mogrify -resize-to-limit [1024, 768] C:/Users/.../AppData/Local/Temp/ActiveStorage-5-20200716-3792-28u8ot.jpg` failed with error: mogrify: unrecognized option `-resize-to-limit' # error/mogrify.c/MogrifyImageCommand/6009.
if status != 0 && options.fetch(:whiny, MiniMagick.whiny)
fail MiniMagick::Error, "`#{command.join(" ")}` failed with error:\n#{stderr}"
end
Model: Product
title
description(action text - attach image in text_area)
Display in view: product.description ( attached image cannot be displayed )
Can anyone help me solve this problem?
Add gem 'image-processing' to your Gemfile and
run bundle install

RTesseract not showing the text of images in rails

I install RTesseract in my application but the issue I face is that after reading any image it just give '/f' in output
image = RTesseract.new('ya.png', lang: 'eng')
image.to_s
Output : "\f"
How can I fix this issue?
If the output is just "\f", that means that tesseract didn't detect any words in the image.

Error during image decoding (imdecode)

I use puthon 2.7, windows 7 and opencv 2.4.6. and I try to run the following code:
https://github.com/kyatou/python-opencv_tutorial/blob/master/08_image_encode_decode.py
#import opencv library
import cv2
import sys
import numpy
argvs=sys.argv
if (len(argvs) != 2):
print 'Usage: # python %s imagefilename' % argvs[0]
quit()
imagefilename = argvs[1]
try:
img=cv2.imread(imagefilename, 1)
except:
print 'faild to load %s' % imagefilename
quit()
#encode to jpeg format
#encode param image quality 0 to 100. default:95
#if you want to shrink data size, choose low image quality.
encode_param=[int(cv2.IMWRITE_JPEG_QUALITY),90]
result,encimg=cv2.imencode('.jpg',img,encode_param)
if False==result:
print 'could not encode image!'
quit()
#decode from jpeg format
decimg=cv2.imdecode(encimg,1)
cv2.imshow('Source Image',img)
cv2.imshow('Decoded image',decimg)
cv2.waitKey(0)
cv2.destroyAllWindows()
I keep getting the following error:
encode_param=[int(cv2.IMWRITE_JPEG_QUALITY), 90]
AttributeError: 'module' object has no attribute 'IMWRITE_JPEG_QUALITY'
I have tried a lot of things: reinstall opencv, convert cv2 to cv code and searched different forums but I keep getting this error. Am I missing something? Is there someone who can run this code without getting the error?
BTW: Other opencv code (taking pictures from webcam) runs without problems....
At the moment I save the image to a temp JPG file. Using the imencode function I want to create the jpg file in the memory.
Thanks in advance and with best regards.
The problem is not in your code, it should work, but it is with your OpenCV Python package. I can't tell you why is raising that error, but you can avoid it by changing the line of the encode_param declaration by this one:
encode_param=[1, 90]

Resources