1 2 Previous Next 22 Replies Latest reply on Mar 24, 2017 11:00 AM by Intel Corporation

    my browser can't see OpenCV.html on Edison web server, why ?

    M.Hawana

      Hello, I'm hoping someone can shed some light on the issue I've been seeing when trying to setup Edison board to run OpenCV sample application.

      I've followed the instructions on this helpful tutorial : http://makezine.com/projects/make-43/photographic-memory/

      I'm able to load the software, setup the WIFI, get internet access to load packages, and was able to execute the suggested program. However, to see the final result I need to point my web browser to the file  "http://192.168.1.17/OpenCV.html" in order to examine the result of image modifications done by the sample program. Unfortunately, I can't seem to get the Edison's server to serve up the page, rather I get this error message:

             "The page at /OpenCV.html was not found."

       

      Another anomaly I encountered may be related to this server, is that my browser can't see the default page if I use the name of my board "http://edison.local". However, I can see the default web page (just fine) if I use this address in browser "http://192.168.1.17". For some reason the name of the board is not getting resolved.

       

      Has anyone seen this kind of error ? any suggestions on how to solve these issues?   thank you in advance for any help.

        • 1. Re: my browser can't see OpenCV.html on Edison web server, why ?
          Intel Corporation
          This message was posted on behalf of Intel Corporation

          Hi M.Hawana,

          Thank you for reaching out.
          I would like to know which image version you’re using on your Edison board? Is it the latest or a previous image?
          Not so long ago some users reported issues with the Edison device information webpage with recent images, so I’m wondering if this might be related to the same issue. Also, looking at the tutorial you’re following I can see that it was made in 2014-2015, so I’m pretty sure an older image was used for the project. I would suggest you to try with an older image, here’s the link to download version 2.1 http://downloadmirror.intel.com/25028/eng/edison-image-ww25.5-15.zip.

          Regards,
          -Pablo

          • 2. Re: my browser can't see OpenCV.html on Edison web server, why ?
            M.Hawana

            Pablo, thanks for your reply.

            as for your question on what image I was using...I was using this version "edison-image-20160315".

             

            as for the suggested image you provided

            "http://downloadmirror.intel.com/25028/eng/edison-image-ww25.5-15.zip"  that image did not work either. I ended up with same results. It seems that the only page I'm able to get out of the web server of the Edison board is to display the default "Device Information" page. 

            It's difficult to work with this Edison board if I can't get the webserver to display the result of the image transformation of my experiments. This is such a fundamental feature I would assume it should work straight out of the box. 

             

            Can you suggest a way to debug this issue? Is there a switch to turn on that would cause the server to spit more debug information which may help in diagnosing this issue ?   Can "Intel support team" help in this matter ?

            • 3. Re: my browser can't see OpenCV.html on Edison web server, why ?
              Intel Corporation
              This message was posted on behalf of Intel Corporation

              Hi M.Hawana,

              Thank you for testing with the instructions we provided in our first post. Let us take a closer look at this case to see if we can provide a different suggestion.
              Just to clarify, when using the 2.1 image did you get the same "The page at /OpenCV.html was not found." message from your first post? Or did you get a different message this time?

              Regards,
              -Pablo

              • 4. Re: my browser can't see OpenCV.html on Edison web server, why ?
                M.Hawana

                Hello Pablo,

                yes, using the image you provided me in the last post, I got the same identical message as before.

                • 5. Re: my browser can't see OpenCV.html on Edison web server, why ?
                  Intel Corporation
                  This message was posted on behalf of Intel Corporation

                  Hi M.Hawana,

                  We believe the error occurs the default Webserver is running and it had priority. This also happens with the Webserver example from the Arduino IDE. It cannot be seen because the one inside the Edison is running.
                  What we do is that we disable this webpage from running from the start, we believe that might solve the issue. Look for the following file /usr/lib/edison_config_tools/edison-config-server.js and comment the line where the script starts running.
                  You can check this thread for additional details https://communities.intel.com/thread/55649.

                  Regards,
                  -Pablo

                  • 6. Re: my browser can't see OpenCV.html on Edison web server, why ?
                    M.Hawana

                    Hello Pablo,

                    per your instructions, I commented out the webserver, and I reset the Edison board. So, now when I point my web browser to load the default page I get a different error:

                    This site can’t be reached

                    192.168.1.17 refused to connect.

                     

                    I also get a similar message when I try loading a specific page like "http://192.168.1.17/OpenCV.html".

                     

                    Pablo, I'm not sure I understand your reasoning for wanting me to stop the default server, because I still need a webserver to display my images. In the example I mentioned at the beginning of this thread, there were no instructions to start a new server. So, in your suggestion above, did you have another webserver that is assumed to be running, or do you expect that I be starting another server myself ?

                    (PS: for the latter option if you want me to start a new server, then can you please point me to instructions to such a step)?

                    • 7. Re: my browser can't see OpenCV.html on Edison web server, why ?
                      Intel Corporation
                      This message was posted on behalf of Intel Corporation

                      Hi M.Hawana,

                      Let us check if we can share some other instructions for you to set up a different webserver or a different way to solve the problem with the current one. Let us keep investigating.

                      Regards,
                      -Pablo

                      • 8. Re: my browser can't see OpenCV.html on Edison web server, why ?
                        Intel Corporation
                        This message was posted on behalf of Intel Corporation

                        Hi M.Hawana,

                         

                        Even if the guide is outside our scope of support given it is not part of our documentation, we have tried to follow every step from it just as you’ve been doing it. What we have found is an error with the Python code and while we try to edit it we were not able to make it work.
                        We received the following error:

                        OpenCV Error: Assertion failed (scn == 3 || scn == 4) in cvtColor, file /edison_dev/yocto/rel3.5/build_edison/tmp/work/core2-32-poky-linux/opencv/2.4.11+gitAUTOINC+2c9547e314-r0/git/modules/imgproc/src/color.cpp, line 3739
                        Traceback (most recent call last):
                        File "FaceDetection.py", line 12, in <module>
                        gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
                        cv2.error: /edison_dev/yocto/rel3.5/build_edison/tmp/work/core2-32-poky-linux/opencv/2.4.11+gitAUTOINC+2c9547e314-r0/git/modules/imgproc/src/color.cpp:3739: error: (-215) scn == 3 || scn == 4 in function cvtColor
                        

                         

                        Looking at the comments from the Makezine tutorial, there are some users who reported issues with the Python script and with the guide itself. From our tests, everything seems to be working from the Edison side, but the complete process in the guide doesn’t seem to be quite correct. The guide is from 2015, and is probably not updated.
                        If you have your own Python script and you’re sure that it is working, you might want to share it with us so we can test it. We can’t assure that we will solve the issue but we can definitely try.

                         

                        Regards,
                        -Pablo

                        • 9. Re: my browser can't see OpenCV.html on Edison web server, why ?
                          M.Hawana

                          Hello Pablo,

                          thank you for the article, but I'm already aware of the issue mentioned in your response. Indeed I worked thru the problem via other comments on that thread. So, I'm not seeing the problem with respect to the python's script because I've modified it locally and overcame the assertion issue. with my changes to the script, I'm able to generate the modified image with the square outline on the faces. All of this took place before I started this discussion thread.

                           

                          However, the main issue that caused me to start this discussion thread is the fact when I want to see the resulting image by pointing my web browser to Edison's html public directory. My browser can't display the image because the web server on Edison is not serving the HTML page called "OpenCV". For some reason, the web server can't find that html file even though it's located in the public directory. Is there something I can do to determine why the Edison web server encounters an error for invoking any webpage other than the default device page?

                           

                          (PS: FYI, I've tested the OpenCV.html file on my host computer, windows 10 and the html page worked just fine, where I can see the before and after pictures resulting from python script. So, this is a work around, but it's ugly because I want to use the Edison's web server instead).

                          • 10. Re: my browser can't see OpenCV.html on Edison web server, why ?
                            Intel Corporation
                            This message was posted on behalf of Intel Corporation

                            Hi M.Hawana,

                            Can we take a look at your Python script? The one that is already working? We were not able to try the “OpenCV” HTML file given we didn’t fix the Python script, however, we didn’t try to open any other HTML file so we would like to know what results we get if we try with your script. If we get the same results as you (the web server on Edison not serving any HTML file) we will definitely dig deeper on this issue.

                            Regards,
                            -Pablo

                            • 11. Re: my browser can't see OpenCV.html on Edison web server, why ?
                              Intel Corporation
                              This message was posted on behalf of Intel Corporation

                              Hi M.Hawana,

                              Did you check our last post? Could you please provide your Python script?

                              Regards,
                              -Pablo

                              • 12. Re: my browser can't see OpenCV.html on Edison web server, why ?
                                M.Hawana

                                Hello Pablo,

                                I'm sorry for the delay in my response. I was away from my lab computer for a while.

                                as you requested, the script used on the site suffers from permission access and a file name extension changes.  So, I've provided my changes below.

                                 

                                However, please Keep in mind, the issue that I'm requesting your help with has nothing to do this the script. the real issue is that I can't access any HTML document in the Edison public server directory (from my browser on my host computer, windows 10).

                                 

                                So, to answer your question above, about sharing my script  changes, they involve manual changes. I put print message to show you what you have to do. Essentially, you'll need to these steps: 

                                1. manually copy the image with the faces, and "haarcascade_frontalface_alt.xml" setup file to the web-server directory "/usr/lib/edison_config_tools/public"
                                2. change directory and execute the script from there: python  FaceDetection_mods.py

                                as a result, you'll see print messages pointing to what I've explained here. if you've copied the files correctly, there should be no error messages. The out file will be created called "in_facefound.png" (this is an image with red rectangles around faces that have been detected).

                                 

                                So, now that script is completed, you'll end up with two images in web-server public directory "in.jpg" and "in_facefound.png". To see these two images, I should invoke script "OpenCV.html" from my browser on the host. This should enable me to see the images on my host. Hence my problem with the web-server on the Edison. My browser can't see anything in directory "/usr/lib/edison_config_tools/public".

                                 

                                In summary, Please note that I can successfully ssh (using WIFI) to my Edison and can run the above script. But I can't point my browser to the edison to perform basic access of any images or html files.

                                • 13. Re: my browser can't see OpenCV.html on Edison web server, why ?
                                  M.Hawana

                                  Pablo, ...Ooop's I attached the wrong file. Here is the modified python script I referenced in my last reply "FaceDetection_mods.py".

                                  • 14. Re: my browser can't see OpenCV.html on Edison web server, why ?
                                    Intel Corporation
                                    This message was posted on behalf of Intel Corporation

                                    Hi Hawana,

                                    Yes, don’t worry about that. I remember that your issue is not with the script but with the Edison server that is not opening any other site besides the Edison information page. Let me give it a try, and I will let you know my results afterwards.

                                    Regards,
                                    -Pablo M. 

                                    1 2 Previous Next