I am rather new to SimpleCV. I am running the newest version of SimpleCV on Windows Vista.
Question: How do I import a zip file containing images into SimpleCV?
The system works fine to import (1) single images on local drive and (2) url links, but I am not able to import a single folder (.zip) from local database into the system.
This is what I did:
machine_learning_data_set = "/Users/Arenzky/Desktop/testdataset.zip"
Can somebody please give me a clue what I am doing wrong?
thanks
At the moment we do not support loading zip files, although that could be added as a feature. We can however load a directory of images. So if you download and extract the the files, you can just load the directory by using:
from SimpleCV import ImageSet
imgs = ImageSet('/path/to/dir/images/')
Related
wondering if anyone can help me. Im following a tutorial which has told me to put the images in the public folder in an app created with create-react-app
'./img/newyork.jpeg'
this is the path the tutorial told me to use for images in the public folder however the images aren't loading and i cant understand why any help would be much appreciated
Build File Structure
You shouldn't keep any image assets in the public folder other than favicons etc See this thread also: The create-react-app imports restriction outside of src directory (TLDR: "This is special restriction added by developers of create-react-app. It is implemented in ModuleScopePlugin to ensure files reside in src/. That plugin ensures that relative imports from app's source directory don't reach outside of it.")
Generally in a create-react-app I would import images like so:
import lovelyImage from 'images/lovely-image.jpg'
and then rendered:
<img src={lovelyImage} alt={''} />
(the example above would assume the images directory is in the src directory (not public))
process.env.PUBLIC_URL + 'your image path'
is a solution I found that works
I am trying to import images from an assets folder in my src folder in my react app but for some reason the path is not being recognised.
My folder structure is as follows:
|src
|Assets
|Common
|Components
I am trying to import the image located in the assets folder from the components folder. I was able to import from my common folder to files in the components folder by doing the following:
import * as Constants from '../Common/Constants';
However following this same structure for loading images has not worked
<img src = '../Assets/myimg.png'></img>
What am I doing wrong?
Thanks
In your code you're providing the image source based on your React app's location, which is neither related to web application's root location, nor media or static files locations (to be configured), so the browser will not know how to render it. Depending on what server you use (nginx, Express) you have to configure your static and/or media files and then specify in your image source based on how you configured.
In your present situation you can do the following:
Import
const reactImage = require("../Assets/myimg.png");
And then use it:
<img src={reactImage.default} />
If you had media files already configured on your server and properly resolving, it would be just
<img src="/media/Assets/myimg.png" />
Assuming media location is already configured and is pointing to the parent directory of your Assets.
In your example you were assuming the relative path of your React import and the image source hardcoded into image tag are same, but they are actually not.
While trying to solve another problem (inadvertently over-wrote /constants/index.js without realizing it), I re-named the constants directory constants2. After restoring index.js, I changed the directory name back to constants.
Now, when RN resolves the path to /constants/Layout.js, it's throwing
undefined is not an object (evaluating '_constants2/default.tabBarHeight')
Changing the name back to constants2 doesn't help.
I have followed all of the instructions for clearing caches (npm and yarn), including deleting the temp cache directory. I have searched the contents of the files in my project and in the cache directory for the string constants2 and nothing found. I have upgraded everything possible.
I'm at wit's end. Where could this old path be stored?? I renamed the directory within Atom and I'm wondering if that might be the source of the trouble. Platform is Windows 10.
Solved this, but I'm not sure why.
I changed this:
import Layout from '../constants';
import Colors from '../constants';
import Images from '../constants';
To this:
import { Colors, Images, Layout } from '../constants';
and the problem went away. Shouldn't either one have worked? And I still can't see why it was still referencing the former path.
I have a submodule in my golang google-app-engine project that I would like to add to my path.
$ ls ./openid/src/openid
discover.go integration verify.go
discover_test.go nonce_store.go xrds.go
discovery_cache.go nonce_store_test.go xrds_test.go
fake_getter_test.go normalizer.go yadis_discovery.go
getter.go normalizer_test.go yadis_discovery_test.go
html_discovery.go redirect.go
html_discovery_test.go redirect_test.go
In the example code for this package, it imports "openid". I'm new to golang's import rules, and I can't for the life of me figure out what I need to put in the import statement of my main file to import this package. I've tried "openid/src/openid", "myapp/openid/src/openid", etc. Can someone provide some clarification of how this works? Or do I need to actually modify the app.yaml file?
"Organizing Go code" mentions:
An import path is the string with which users import a package.
It specifies the directory (relative to $GOROOT/src/pkg or $GOPATH/src) in which the package's source code resides.
So make sure to use an import statement referring to a path which exists in your $GOPATH/src. (GOPATH being your "workspace", in which you have namespaces, as shown in this video).
Also make sure you build first openid/src/openid sources. And install it (go install).
As detailed in this answer:
Import paths can be be globally unique.
In conjunction with GOPATH, import path can be translated unambiguously to a directory path.
Any directory path under GOPATH can be unambiguously translated to an import path.
I have this error, When i import .po file in drupal admin panel,
Configuration » Regional and language » Translate interface
Error: File upload error. Could not move uploaded file.
Error: File to import not found.
Anybody know how to rectify this error...
I found a way to do this using Drush and Localization Update.
Install Localization Update
Configure a local path for po-files (admin/config/regional/language/update)
Configure automatic updates from remote servers or just local sources
Now you can put your own po-files in a local path (for example sites/all/translations). If you have translations for your own module then you name it according to this naming convention:
modulename-version.language.po
So a Swedish po-file for 'my_module', version 7.x-1.1 would be named:
my_module-7.x-1.1.sv.po
Now you have everything setup and you can start updating your sites translation with Drush:
drush l10n-update-refresh // Looks for new po-files
drush l10n-update // Updates translations