Hi,
I want to have a list of four images which I can use for testing a block processing algorithm, queued ready for processing, call image 1, process, call image, 2 and process and so on.
Using this code:
close all
clear all
%% prepare file list for processing
I = which('f1.jpg');
filelist = dir([fileparts(I) filesep 'f*.jpg']);
fileNames = {filelist.name}';
%% Load first frame -- works till here --
I = imread(fileNames(1));
Then get error message;
??? Conversion to logical from cell is not possible.
Error in ==> imread at 329
if (strfind(filename, '://'))
%%
f1 = rgb2gray(I);
figure, imshow(f1)
Does anyone have any ideas on how I can have the file queue and overcome this error
Regards,
Stewart.
|
|
0
|
|
|
|
Reply
|
Stewart
|
5/4/2010 6:29:07 PM |
|
On Tue, 04 May 2010 14:29:07 -0400, Stewart
<tired2409.remove@hotmail.com> wrote:
> Hi,
>
> I want to have a list of four images which I can use for testing a block
> processing algorithm, queued ready for processing, call image 1,
> process, call image, 2 and process and so on.
>
> Using this code:
>
> close all
> clear all
> %% prepare file list for processing
> I = which('f1.jpg');
> filelist = dir([fileparts(I) filesep 'f*.jpg']);
> fileNames = {filelist.name}';
> %% Load first frame -- works till here --
>
> I = imread(fileNames(1));
>
> Then get error message; ??? Conversion to logical from cell is not
> possible.
>
> Error in ==> imread at 329
> if (strfind(filename, '://'))
>
> %% f1 = rgb2gray(I);
> figure, imshow(f1)
>
> Does anyone have any ideas on how I can have the file queue and overcome
> this error
>
> Regards,
>
> Stewart.
fileNames is a cell array. When you index into a cell array using (), you
get a cell array back. You need to use {} indexing to get to the string.
use fileNames{1} in your IMREAD function call.
|
|
0
|
|
|
|
Reply
|
Ashish
|
5/6/2010 12:20:03 PM
|
|
"Stewart " <tired2409.remove@hotmail.com> wrote in message <hrpp1j$fbp$1@fred.mathworks.com>...
> Hi,
>
> I want to have a list of four images which I can use for testing a block processing algorithm, queued ready for processing, call image 1, process, call image, 2 and process and so on.
>
> Using this code:
>
> close all
> clear all
> %% prepare file list for processing
> I = which('f1.jpg');
> filelist = dir([fileparts(I) filesep 'f*.jpg']);
> fileNames = {filelist.name}';
> %% Load first frame -- works till here --
>
> I = imread(fileNames(1));
>
> Then get error message;
> ??? Conversion to logical from cell is not possible.
>
> Error in ==> imread at 329
> if (strfind(filename, '://'))
>
> %%
> f1 = rgb2gray(I);
> figure, imshow(f1)
>
> Does anyone have any ideas on how I can have the file queue and overcome this error
>
> Regards,
>
> Stewart.
Thank you I would never have spotted the different brackets.
Stewart.
|
|
0
|
|
|
|
Reply
|
Stewart
|
5/6/2010 2:19:04 PM
|
|
|
2 Replies
437 Views
(page loaded in 0.037 seconds)
Similiar Articles: Cisco ACS - Limit Network Access Profiles to Active Directory User ...I'm currently in the process of migrating from Microsoft ... So far I've been fairly successful getting user ... Is there a system-wide limit on number of queued TCP ... Extract a bordered, skewed rectangle from an image - comp.lang ...The label has been designed to have a border that makes it easy to determine the corr... ... You can keep several windows up to date when you test process an image through ... .g64 images - comp.sys.cbm... bytes again. 40 Bytes would need to be queued ... no, I don't mean FGPAs here), that would have been ... from an Image say ... two, and you will have three greyscale images ... Controlling CPU utilization of a process - comp.unix.solaris ...Hello, My objective here is that i have a cpu intensive process ... is out of my scope and has already been deployed. ... with an Apache webserver the requests get queued ... Problems getting photos from Canon EOS D20 - comp.graphics.apps ...The list doesn't have the 30D on there either and that camera has been out close to a year (I ... A given image editing program may be able to process a 20D .cr2 file but ... How to disable outgoing FTP service? - comp.os.vmsMy old OpenVMS server had been replaced with a new ... and do a SHOW PROC/CONT/ID=xxxxxx for that user's process ... exact file name is) to see if it is still a known image. ms2gt MODIS reprojection toolkit - comp.lang.idl-pvwaveI used it to process MODIS raw radiance data and I found ... Had I created the files myself, they would have been ... But there should be no problem if you take an image ... Does anyone have sample java code for extracting pdf metadata ...I have been reading the documentation and it mentions ... probably understand this library import process - the way I have ... Portable Document Format ... ... ... an image ... Practice of using fork() - comp.unix.programmer(Then I wonder why fork exists, instead of having something like > spawn_process(image ... is that it can be difficult to perform this trick, since the issues that have been ... How to detect begin and end of a resize operation - comp.lang.tcl ...> Helmut Giese you would have to hook into the window ... Hy everybody, I'm trying to resize an ENVI image insinde ... an operation within a shell script. ... the slow process ... Speed: NGen Revs Up Your Performance with Powerful New FeaturesIn addition, there have been quite a few ... optional argument, and will only process queued ... images for all assemblies in that list that don't have valid native images ... Process Scheduler - PeopleSoft WikiThere are a number of reasons why a process might be stuck at queued. ... database (BLOBs) and to put the photos into ... Join to PS_CDM_FILE_LIST on the process instance to get ... 7/23/2012 10:21:09 AM
|